From: Lingzhu Xiang Date: Sat, 5 Jan 2013 05:59:52 +0000 (+0800) Subject: efivarfs: Drop link count of the right inode X-Git-Tag: v3.8-rc6~5^2^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=de5fe95587b4dcc86cc451fce2909dfa504fce10;p=profile%2Fivi%2Fkernel-x86-ivi.git 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 Cc: Jeremy Kerr Tested-by: Lee, Chun-Yi Signed-off-by: Matt Fleming --- diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c index 7b1c374..fa9fa03 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; }