aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/9p/vfs_inode.c4
-rw-r--r--fs/9p/vfs_inode_dotl.c2
-rw-r--r--fs/cifs/dir.c6
-rw-r--r--fs/fuse/dir.c2
-rw-r--r--fs/nfs/dir.c6
5 files changed, 10 insertions, 10 deletions
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 47f71eb66b32..7f9976a866e9 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -633,7 +633,7 @@ v9fs_vfs_create(struct inode *dir, struct dentry *dentry, int mode,
633 fid = NULL; 633 fid = NULL;
634 v9ses = v9fs_inode2v9ses(dir); 634 v9ses = v9fs_inode2v9ses(dir);
635 perm = unixmode2p9mode(v9ses, mode); 635 perm = unixmode2p9mode(v9ses, mode);
636 if (nd && nd->flags & LOOKUP_OPEN) 636 if (nd)
637 flags = nd->intent.open.flags; 637 flags = nd->intent.open.flags;
638 else 638 else
639 flags = O_RDWR; 639 flags = O_RDWR;
@@ -649,7 +649,7 @@ v9fs_vfs_create(struct inode *dir, struct dentry *dentry, int mode,
649 649
650 v9fs_invalidate_inode_attr(dir); 650 v9fs_invalidate_inode_attr(dir);
651 /* if we are opening a file, assign the open fid to the file */ 651 /* if we are opening a file, assign the open fid to the file */
652 if (nd && nd->flags & LOOKUP_OPEN) { 652 if (nd) {
653 v9inode = V9FS_I(dentry->d_inode); 653 v9inode = V9FS_I(dentry->d_inode);
654 mutex_lock(&v9inode->v_mutex); 654 mutex_lock(&v9inode->v_mutex);
655 if (v9ses->cache && !v9inode->writeback_fid && 655 if (v9ses->cache && !v9inode->writeback_fid &&
diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c
index d148e69f21b5..32bbbe5aa689 100644
--- a/fs/9p/vfs_inode_dotl.c
+++ b/fs/9p/vfs_inode_dotl.c
@@ -173,7 +173,7 @@ v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, int omode,
173 struct posix_acl *pacl = NULL, *dacl = NULL; 173 struct posix_acl *pacl = NULL, *dacl = NULL;
174 174
175 v9ses = v9fs_inode2v9ses(dir); 175 v9ses = v9fs_inode2v9ses(dir);
176 if (nd && nd->flags & LOOKUP_OPEN) 176 if (nd)
177 flags = nd->intent.open.flags; 177 flags = nd->intent.open.flags;
178 else { 178 else {
179 /* 179 /*
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index fa8c21d913bc..8766149f6300 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -179,7 +179,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
179 if (oplockEnabled) 179 if (oplockEnabled)
180 oplock = REQ_OPLOCK; 180 oplock = REQ_OPLOCK;
181 181
182 if (nd && (nd->flags & LOOKUP_OPEN)) 182 if (nd)
183 oflags = nd->intent.open.file->f_flags; 183 oflags = nd->intent.open.file->f_flags;
184 else 184 else
185 oflags = O_RDONLY | O_CREAT; 185 oflags = O_RDONLY | O_CREAT;
@@ -214,7 +214,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
214 which should be rare for path not covered on files) */ 214 which should be rare for path not covered on files) */
215 } 215 }
216 216
217 if (nd && (nd->flags & LOOKUP_OPEN)) { 217 if (nd) {
218 /* if the file is going to stay open, then we 218 /* if the file is going to stay open, then we
219 need to set the desired access properly */ 219 need to set the desired access properly */
220 desiredAccess = 0; 220 desiredAccess = 0;
@@ -328,7 +328,7 @@ cifs_create_set_dentry:
328 else 328 else
329 cFYI(1, "Create worked, get_inode_info failed rc = %d", rc); 329 cFYI(1, "Create worked, get_inode_info failed rc = %d", rc);
330 330
331 if (newinode && nd && (nd->flags & LOOKUP_OPEN)) { 331 if (newinode && nd) {
332 struct cifsFileInfo *pfile_info; 332 struct cifsFileInfo *pfile_info;
333 struct file *filp; 333 struct file *filp;
334 334
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index 47559dd33193..02063dde2728 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -576,7 +576,7 @@ static int fuse_mknod(struct inode *dir, struct dentry *entry, int mode,
576static int fuse_create(struct inode *dir, struct dentry *entry, int mode, 576static int fuse_create(struct inode *dir, struct dentry *entry, int mode,
577 struct nameidata *nd) 577 struct nameidata *nd)
578{ 578{
579 if (nd && (nd->flags & LOOKUP_OPEN)) { 579 if (nd) {
580 int err = fuse_create_open(dir, entry, mode, nd); 580 int err = fuse_create_open(dir, entry, mode, nd);
581 if (err != -ENOSYS) 581 if (err != -ENOSYS)
582 return err; 582 return err;
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index b5f63a50fa7f..77ae95f15497 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1585,7 +1585,7 @@ static int nfs_open_create(struct inode *dir, struct dentry *dentry, int mode,
1585 attr.ia_mode = mode; 1585 attr.ia_mode = mode;
1586 attr.ia_valid = ATTR_MODE; 1586 attr.ia_valid = ATTR_MODE;
1587 1587
1588 if (nd && (nd->flags & LOOKUP_OPEN) != 0) 1588 if (nd)
1589 open_flags = nd->intent.open.flags; 1589 open_flags = nd->intent.open.flags;
1590 1590
1591 ctx = create_nfs_open_context(dentry, open_flags); 1591 ctx = create_nfs_open_context(dentry, open_flags);
@@ -1596,7 +1596,7 @@ static int nfs_open_create(struct inode *dir, struct dentry *dentry, int mode,
1596 error = NFS_PROTO(dir)->create(dir, dentry, &attr, open_flags, ctx); 1596 error = NFS_PROTO(dir)->create(dir, dentry, &attr, open_flags, ctx);
1597 if (error != 0) 1597 if (error != 0)
1598 goto out_put_ctx; 1598 goto out_put_ctx;
1599 if (nd && (nd->flags & LOOKUP_OPEN) != 0) { 1599 if (nd) {
1600 error = nfs_intent_set_file(nd, ctx); 1600 error = nfs_intent_set_file(nd, ctx);
1601 if (error < 0) 1601 if (error < 0)
1602 goto out_err; 1602 goto out_err;
@@ -1675,7 +1675,7 @@ static int nfs_create(struct inode *dir, struct dentry *dentry, int mode,
1675 attr.ia_mode = mode; 1675 attr.ia_mode = mode;
1676 attr.ia_valid = ATTR_MODE; 1676 attr.ia_valid = ATTR_MODE;
1677 1677
1678 if (nd && (nd->flags & LOOKUP_OPEN) != 0) 1678 if (nd)
1679 open_flags = nd->intent.open.flags; 1679 open_flags = nd->intent.open.flags;
1680 1680
1681 error = NFS_PROTO(dir)->create(dir, dentry, &attr, open_flags, NULL); 1681 error = NFS_PROTO(dir)->create(dir, dentry, &attr, open_flags, NULL);