+ if (rc < 0) {
+ switch(rc) {
+ case -EDQUOT:
+ case -ENFILE:
+ case -ENOMEM:
+ /*
+ * The keyring is full. Clear the keyring and try again
+ */
+ rc = keyring_clear(DEFAULT_KEYRING);
+ if (rc == 0)
+ rc = keyctl_instantiate(key, id, strlen(id) + 1, 0);
+ break;
+ default:
+ break;
+ }
+ }