Re: nfsv2 ref leak in 2.6.24?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Trond Myklebust
Date: Saturday, October 20, 2007 - 10:12 am

On Fri, 2007-10-19 at 22:33 -0400, Erez Zadok wrote:

Ah... I got confused as to what you were measuring and where. Looking at
nfs_proc_create(), there is indeed a missing call to
nfs_mark_for_revalidate(). The reason why you need such a call being the
usual one: NFSv2 doesn't provide post-op attributes for the directory.

The patch below ought to fix the problem.

Cheers
  Trond
---------------------- CUT HERE -----------------------
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: Sat, 20 Oct 2007 13:07:21 -0400
NFSv2: Ensure that the directory metadata gets revalidated on file create

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
---

 fs/nfs/proc.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/nfs/proc.c b/fs/nfs/proc.c
index 97669ed..4f80d88 100644
--- a/fs/nfs/proc.c
+++ b/fs/nfs/proc.c
@@ -211,6 +211,7 @@ nfs_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr,
 	nfs_fattr_init(&fattr);
 	dprintk("NFS call  create %s\n", dentry->d_name.name);
 	status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
+	nfs_mark_for_revalidate(dir);
 	if (status == 0)
 		status = nfs_instantiate(dentry, &fhandle, &fattr);
 	dprintk("NFS reply create: %d\n", status);


-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
nfsv2 ref leak in 2.6.24?, Erez Zadok, (Thu Oct 18, 10:49 pm)
Re: nfsv2 ref leak in 2.6.24?, Trond Myklebust, (Fri Oct 19, 6:41 am)
Re: nfsv2 ref leak in 2.6.24? , Erez Zadok, (Fri Oct 19, 2:40 pm)
Re: nfsv2 ref leak in 2.6.24?, Trond Myklebust, (Fri Oct 19, 2:52 pm)
Re: nfsv2 ref leak in 2.6.24? , Erez Zadok, (Fri Oct 19, 3:59 pm)
Re: nfsv2 ref leak in 2.6.24? , Erez Zadok, (Fri Oct 19, 7:33 pm)
Re: nfsv2 ref leak in 2.6.24?, Trond Myklebust, (Sat Oct 20, 10:12 am)
Re: nfsv2 ref leak in 2.6.24? , Erez Zadok, (Sat Oct 20, 12:04 pm)
Re: nfsv2 ref leak in 2.6.24? , Erez Zadok, (Sat Oct 20, 2:35 pm)
Re: nfsv2 ref leak in 2.6.24?, Trond Myklebust, (Sun Oct 21, 9:58 am)
Re: nfsv2 ref leak in 2.6.24? , Erez Zadok, (Sun Oct 21, 3:18 pm)