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:
Lingzhu Xiang 2013-01-05 13:59:52 +08:00 committed by Matt Fleming
parent 7d1f9aeff1
commit de5fe95587

View file

@ -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;
}