}
/* Only creates */
- if (!(flags & O_CREAT) || dentry->d_inode) {
- finish_no_open(file, res);
- return 1;
- }
+ if (!(flags & O_CREAT) || dentry->d_inode)
+ return finish_no_open(file, res);
err = 0;
fid = NULL;
}
/* Only creates */
- if (!(flags & O_CREAT) || dentry->d_inode) {
- finish_no_open(file, res);
- return 1;
- }
+ if (!(flags & O_CREAT) || dentry->d_inode)
+ return finish_no_open(file, res);
v9ses = v9fs_inode2v9ses(dir);
}
/* We don't deal with positive dentries here */
- if (dentry->d_inode) {
- finish_no_open(file, res);
- return 1;
- }
+ if (dentry->d_inode)
+ return finish_no_open(file, res);
*opened |= FILE_CREATED;
err = ceph_lookup_open(dir, dentry, file, flags, mode, opened);
if (IS_ERR(res))
return PTR_ERR(res);
- finish_no_open(file, res);
- return 1;
+ return finish_no_open(file, res);
}
rc = check_name(direntry);
if (err)
goto out_dput;
no_open:
- finish_no_open(file, res);
- return 1;
+ return finish_no_open(file, res);
}
/*
if (IS_ERR(res))
goto out;
- finish_no_open(file, res);
- return 1;
+ return finish_no_open(file, res);
}
static int nfs4_lookup_revalidate(struct dentry *dentry, struct nameidata *nd)
* This can be used to set the result of a successful lookup in ->atomic_open().
* The filesystem's atomic_open() method shall return NULL after calling this.
*/
-void finish_no_open(struct file *file, struct dentry *dentry)
+int finish_no_open(struct file *file, struct dentry *dentry)
{
file->f_path.dentry = dentry;
+ return 1;
}
EXPORT_SYMBOL(finish_no_open);
extern int finish_open(struct file *file, struct dentry *dentry,
int (*open)(struct inode *, struct file *),
int *opened);
-extern void finish_no_open(struct file *file, struct dentry *dentry);
+extern int finish_no_open(struct file *file, struct dentry *dentry);
/* fs/ioctl.c */