]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] NFS: Fix lookup intent handling
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 7 Jun 2005 22:37:01 +0000 (18:37 -0400)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 7 Jun 2005 22:53:47 +0000 (15:53 -0700)
commitd82b034af8f642803b70ce14916b0a18f161bc48
tree65e75b32e0810961615101cb1f137a060c707c6b
parent5b85afae4bfd6c5c45032b52c28fd0283e6dda88
[PATCH] NFS: Fix lookup intent handling

We should never apply a lookup intent to anything other than the last
path component in an open(), create() or access() call.

Introduce the helper nfs_lookup_check_intent() which always returns
zero if LOOKUP_CONTINUE or LOOKUP_PARENT are set, and returns the
intent flags if we're on the last component of the lookup.
By doing so, we fix a bug in open(O_EXCL), where we may end up
optimizing away a real lookup of the parent directory.

Problem noticed by Linda Dunaphant <linda.dunaphant@ccur.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/nfs/dir.c