]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[PATCH] namei fixes (13/19)
authorAl Viro <viro@www.linux.org.uk>
Mon, 6 Jun 2005 20:36:08 +0000 (13:36 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 6 Jun 2005 21:42:26 +0000 (14:42 -0700)
commitba7a4c1a76f56c607560f1676680ff491747bdae
treec68f4fd0d5802819eb16dc6c126b2c24f4e09634
parenta15a3f6fc67d910f43098acec6e19d25a37d7cb9
[PATCH] namei fixes (13/19)

In open_namei() exit_dput: we have mntput() done in the wrong order -
if nd->mnt != path.mnt we end up doing
mntput(nd->mnt);
nd->mnt = path.mnt;
dput(nd->dentry);
mntput(nd->mnt);
which drops nd->dentry too late.  Fixed by having path.mnt go first.
That allows to switch O_NOFOLLOW under if (__follow_mount(...)) back
to exit_dput, while we are at it.

Fix for early-mntput() race + equivalent transformation.

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/namei.c