]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - security/keys/key.c
KEYS: refcount bug fix
[karo-tx-linux.git] / security / keys / key.c
index 09ef276c4bdcaf8e0c419df61d1cd7b07bf5253c..07a87311055c5b50916c87f2117f4c70b0321cfd 100644 (file)
@@ -430,8 +430,7 @@ static int __key_instantiate_and_link(struct key *key,
 
                        /* and link it into the destination keyring */
                        if (keyring) {
-                               if (test_bit(KEY_FLAG_KEEP, &keyring->flags))
-                                       set_bit(KEY_FLAG_KEEP, &key->flags);
+                               set_bit(KEY_FLAG_KEEP, &key->flags);
 
                                __key_link(key, _edit);
                        }