Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix locking in efi_secret_unlink()

We used to need securityfs_remove() to undo simple_pin_fs() done when
the file had been created and to drop the second extra reference
taken at the same time. Now that neither is needed (or done by
securityfs_remove()), we can simply call simple_unlink() and be done
with that - the broken games with locking had been there only for the
sake of securityfs_remove().

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

+1 -9
+1 -9
drivers/virt/coco/efi_secret/efi_secret.c
··· 136 136 if (s->fs_files[i] == dentry) 137 137 s->fs_files[i] = NULL; 138 138 139 - /* 140 - * securityfs_remove tries to lock the directory's inode, but we reach 141 - * the unlink callback when it's already locked 142 - */ 143 - inode_unlock(dir); 144 - securityfs_remove(dentry); 145 - inode_lock(dir); 146 - 147 - return 0; 139 + return simple_unlink(inode, dentry); 148 140 } 149 141 150 142 static const struct inode_operations efi_secret_dir_inode_operations = {