summaryrefslogtreecommitdiffstats
path: root/fs/nfs/dir.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2007-06-05 18:30:00 +0200
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-07-11 05:40:24 +0200
commitad389da79f7bf9dc12dbc79c9c2740f9ed2f13d1 (patch)
tree9fd51d8a43aaba790a87f721d2796e36ab9f66e7 /fs/nfs/dir.c
parentNFSv4: Cleanup: pass the nfs_open_context to open recovery code (diff)
downloadlinux-ad389da79f7bf9dc12dbc79c9c2740f9ed2f13d1.tar.xz
linux-ad389da79f7bf9dc12dbc79c9c2740f9ed2f13d1.zip
NFSv4: Ensure asynchronous open() calls always pin the mountpoint
A number of race conditions may currently ensue if the user presses ^C and then unmounts the partition while an asynchronous open() is in progress. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r--fs/nfs/dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index c27258b5d3e1..4948ec1dd9bd 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1244,7 +1244,7 @@ static int nfs_create(struct inode *dir, struct dentry *dentry, int mode,
attr.ia_mode = mode;
attr.ia_valid = ATTR_MODE;
- if (nd && (nd->flags & LOOKUP_CREATE))
+ if ((nd->flags & LOOKUP_CREATE) != 0)
open_flags = nd->intent.open.flags;
lock_kernel();