aboutsummaryrefslogtreecommitdiff
path: root/fs/nfs/dir.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2007-06-05 12:30:00 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-07-10 23:40:24 -0400
commitad389da79f7bf9dc12dbc79c9c2740f9ed2f13d1 (patch)
tree9fd51d8a43aaba790a87f721d2796e36ab9f66e7 /fs/nfs/dir.c
parent539cd03a5708c9861a3e738e6f363ad743c85ddf (diff)
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 c27258b5d3e..4948ec1dd9b 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();