summaryrefslogtreecommitdiffstats
path: root/drivers/firmware/efivars.c
diff options
context:
space:
mode:
authorLingzhu Xiang <lxiang@redhat.com>2013-01-05 06:59:52 +0100
committerMatt Fleming <matt.fleming@intel.com>2013-01-18 10:43:43 +0100
commitde5fe95587b4dcc86cc451fce2909dfa504fce10 (patch)
tree0aa4300c1cfd134d192bb48842a550fee6e8e1af /drivers/firmware/efivars.c
parentLinux 3.8-rc4 (diff)
downloadlinux-de5fe95587b4dcc86cc451fce2909dfa504fce10.tar.xz
linux-de5fe95587b4dcc86cc451fce2909dfa504fce10.zip
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>
Diffstat (limited to 'drivers/firmware/efivars.c')
-rw-r--r--drivers/firmware/efivars.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c
index 7b1c37497c9a..fa9fa038de3f 100644
--- a/drivers/firmware/efivars.c
+++ b/drivers/firmware/efivars.c
@@ -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;
}