aboutsummaryrefslogtreecommitdiffstats
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 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,
1244 attr.ia_mode = mode; 1244 attr.ia_mode = mode;
1245 attr.ia_valid = ATTR_MODE; 1245 attr.ia_valid = ATTR_MODE;
1246 1246
1247 if (nd && (nd->flags & LOOKUP_CREATE)) 1247 if ((nd->flags & LOOKUP_CREATE) != 0)
1248 open_flags = nd->intent.open.flags; 1248 open_flags = nd->intent.open.flags;
1249 1249
1250 lock_kernel(); 1250 lock_kernel();