efivarfs: Drop link count of the right inode
efivarfs_unlink() should drop the file's link count, not the directory's. Signed-off-by: Lingzhu Xiang <lxiang@redhat.com> Cc: Jeremy Kerr <jeremy.kerr@canonical.com> Tested-by: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
This commit is contained in:
parent
7d1f9aeff1
commit
de5fe95587
@ -994,7 +994,7 @@ static int efivarfs_unlink(struct inode *dir, struct dentry *dentry)
|
||||
list_del(&var->list);
|
||||
spin_unlock(&efivars->lock);
|
||||
efivar_unregister(var);
|
||||
drop_nlink(dir);
|
||||
drop_nlink(dentry->d_inode);
|
||||
dput(dentry);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user