Re: [PATCH] efivarfs: drop_nlink on the correct inode in efivarfs_unlink

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2013-01-27 at 06:49 +0800, Jeremy Kerr wrote:
> Currently, we're calling drop_nlink on the directory, not the file
> inode.
> 
> Signed-off-by: Jeremy Kerr <jk@xxxxxxxxxx>
> 
> ---
>  drivers/firmware/efivars.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks Jeremy, but I've already queued up the below patch from Lingzhu.
But I now realise that while I did send out a pull request with the
commit, I didn't put it on a public branch. So I've merged my urgent
queue of patches into master.

---

>From de5fe95587b4dcc86cc451fce2909dfa504fce10 Mon Sep 17 00:00:00 2001
From: Lingzhu Xiang <lxiang@xxxxxxxxxx>
Date: Sat, 5 Jan 2013 13:59:52 +0800
Subject: [PATCH] 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@xxxxxxxxxx>
Cc: Jeremy Kerr <jeremy.kerr@xxxxxxxxxxxxx>
Tested-by: Lee, Chun-Yi <jlee@xxxxxxxx>
Signed-off-by: Matt Fleming <matt.fleming@xxxxxxxxx>
---
 drivers/firmware/efivars.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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



-- 
Matt Fleming, Intel Open Source Technology Center

--
To unsubscribe from this list: send the line "unsubscribe linux-efi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux