Re: [FIX] mntput called before dput in afs

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Howells
Date: Thursday, August 30, 2007 - 8:56 am

From: Andreas Gruenbacher <agruen@suse.de>

dput must be called before mntput here. Please consider for 2.6.24 and stable.

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Acked-By: David Howells <dhowells@redhat.com>

---
 fs/afs/mntpt.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/afs/mntpt.c
+++ b/fs/afs/mntpt.c
@@ -235,8 +235,8 @@ static void *afs_mntpt_follow_link(struc
 	err = do_add_mount(newmnt, nd, MNT_SHRINKABLE, &afs_vfsmounts);
 	switch (err) {
 	case 0:
-		mntput(nd->mnt);
 		dput(nd->dentry);
+		mntput(nd->mnt);
 		nd->mnt = newmnt;
 		nd->dentry = dget(newmnt->mnt_root);
 		schedule_delayed_work(&afs_mntpt_expiry_timer,

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

Messages in current thread:
[patch 2/4] Use pathput in a few more places, Andreas Gruenbacher, (Fri Aug 10, 7:22 am)
Re: [patch 2/4] Use pathput in a few more places, Christoph Hellwig, (Wed Aug 29, 12:08 pm)
[FIX] mntput called before dput in afs, Andreas Gruenbacher, (Thu Aug 30, 8:01 am)
Re: [FIX] mntput called before dput in afs, David Howells, (Thu Aug 30, 8:15 am)
Re: [FIX] mntput called before dput in afs, David Howells, (Thu Aug 30, 8:56 am)