提交 be12af3e 编写于 作者: A Al Viro

getting rid of 'opened' argument of ->atomic_open() - part 1

'opened' argument of finish_open() is unused.  Kill it.

Signed-off-by Al Viro <viro@zeniv.linux.org.uk>
上级 6035a27b
...@@ -917,7 +917,7 @@ v9fs_vfs_atomic_open(struct inode *dir, struct dentry *dentry, ...@@ -917,7 +917,7 @@ v9fs_vfs_atomic_open(struct inode *dir, struct dentry *dentry,
v9inode->writeback_fid = (void *) inode_fid; v9inode->writeback_fid = (void *) inode_fid;
} }
mutex_unlock(&v9inode->v_mutex); mutex_unlock(&v9inode->v_mutex);
err = finish_open(file, dentry, generic_file_open, opened); err = finish_open(file, dentry, generic_file_open);
if (err) if (err)
goto error; goto error;
......
...@@ -352,7 +352,7 @@ v9fs_vfs_atomic_open_dotl(struct inode *dir, struct dentry *dentry, ...@@ -352,7 +352,7 @@ v9fs_vfs_atomic_open_dotl(struct inode *dir, struct dentry *dentry,
} }
mutex_unlock(&v9inode->v_mutex); mutex_unlock(&v9inode->v_mutex);
/* Since we are opening a file, assign the open fid to the file */ /* Since we are opening a file, assign the open fid to the file */
err = finish_open(file, dentry, generic_file_open, opened); err = finish_open(file, dentry, generic_file_open);
if (err) if (err)
goto err_clunk_old_fid; goto err_clunk_old_fid;
file->private_data = ofid; file->private_data = ofid;
......
...@@ -509,7 +509,7 @@ int ceph_atomic_open(struct inode *dir, struct dentry *dentry, ...@@ -509,7 +509,7 @@ int ceph_atomic_open(struct inode *dir, struct dentry *dentry,
ceph_init_inode_acls(d_inode(dentry), &acls); ceph_init_inode_acls(d_inode(dentry), &acls);
file->f_mode |= FMODE_CREATED; file->f_mode |= FMODE_CREATED;
} }
err = finish_open(file, dentry, ceph_open, opened); err = finish_open(file, dentry, ceph_open);
} }
out_req: out_req:
if (!req->r_err && req->r_target_inode) if (!req->r_err && req->r_target_inode)
......
...@@ -541,7 +541,7 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry, ...@@ -541,7 +541,7 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry,
if ((oflags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL)) if ((oflags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
file->f_mode |= FMODE_CREATED; file->f_mode |= FMODE_CREATED;
rc = finish_open(file, direntry, generic_file_open, opened); rc = finish_open(file, direntry, generic_file_open);
if (rc) { if (rc) {
if (server->ops->close) if (server->ops->close)
server->ops->close(xid, tcon, &fid); server->ops->close(xid, tcon, &fid);
......
...@@ -469,7 +469,7 @@ static int fuse_create_open(struct inode *dir, struct dentry *entry, ...@@ -469,7 +469,7 @@ static int fuse_create_open(struct inode *dir, struct dentry *entry,
d_instantiate(entry, inode); d_instantiate(entry, inode);
fuse_change_entry_timeout(entry, &outentry); fuse_change_entry_timeout(entry, &outentry);
fuse_invalidate_attr(dir); fuse_invalidate_attr(dir);
err = finish_open(file, entry, generic_file_open, opened); err = finish_open(file, entry, generic_file_open);
if (err) { if (err) {
fuse_sync_release(ff, flags); fuse_sync_release(ff, flags);
} else { } else {
......
...@@ -626,7 +626,7 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry, ...@@ -626,7 +626,7 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
error = 0; error = 0;
if (file) { if (file) {
if (S_ISREG(inode->i_mode)) if (S_ISREG(inode->i_mode))
error = finish_open(file, dentry, gfs2_open_common, opened); error = finish_open(file, dentry, gfs2_open_common);
else else
error = finish_no_open(file, NULL); error = finish_no_open(file, NULL);
} }
...@@ -768,7 +768,7 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry, ...@@ -768,7 +768,7 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
d_instantiate(dentry, inode); d_instantiate(dentry, inode);
if (file) { if (file) {
file->f_mode |= FMODE_CREATED; file->f_mode |= FMODE_CREATED;
error = finish_open(file, dentry, gfs2_open_common, opened); error = finish_open(file, dentry, gfs2_open_common);
} }
gfs2_glock_dq_uninit(ghs); gfs2_glock_dq_uninit(ghs);
gfs2_glock_dq_uninit(ghs + 1); gfs2_glock_dq_uninit(ghs + 1);
...@@ -866,7 +866,7 @@ static struct dentry *__gfs2_lookup(struct inode *dir, struct dentry *dentry, ...@@ -866,7 +866,7 @@ static struct dentry *__gfs2_lookup(struct inode *dir, struct dentry *dentry,
return d; return d;
} }
if (file && S_ISREG(inode->i_mode)) if (file && S_ISREG(inode->i_mode))
error = finish_open(file, dentry, gfs2_open_common, opened); error = finish_open(file, dentry, gfs2_open_common);
gfs2_glock_dq_uninit(&gh); gfs2_glock_dq_uninit(&gh);
if (error) { if (error) {
......
...@@ -3475,7 +3475,7 @@ static int do_tmpfile(struct nameidata *nd, unsigned flags, ...@@ -3475,7 +3475,7 @@ static int do_tmpfile(struct nameidata *nd, unsigned flags,
if (error) if (error)
goto out2; goto out2;
file->f_path.mnt = path.mnt; file->f_path.mnt = path.mnt;
error = finish_open(file, child, NULL, opened); error = finish_open(file, child, NULL);
out2: out2:
mnt_drop_write(path.mnt); mnt_drop_write(path.mnt);
out: out:
......
...@@ -1439,7 +1439,7 @@ static int nfs_finish_open(struct nfs_open_context *ctx, ...@@ -1439,7 +1439,7 @@ static int nfs_finish_open(struct nfs_open_context *ctx,
{ {
int err; int err;
err = finish_open(file, dentry, do_open, opened); err = finish_open(file, dentry, do_open);
if (err) if (err)
goto out; goto out;
if (S_ISREG(file->f_path.dentry->d_inode->i_mode)) if (S_ISREG(file->f_path.dentry->d_inode->i_mode))
......
...@@ -843,8 +843,7 @@ static int do_dentry_open(struct file *f, ...@@ -843,8 +843,7 @@ static int do_dentry_open(struct file *f,
* Returns zero on success or -errno if the open failed. * Returns zero on success or -errno if the open failed.
*/ */
int finish_open(struct file *file, struct dentry *dentry, int finish_open(struct file *file, struct dentry *dentry,
int (*open)(struct inode *, struct file *), int (*open)(struct inode *, struct file *))
int *opened)
{ {
BUG_ON(file->f_mode & FMODE_OPENED); /* once it's opened, it's opened */ BUG_ON(file->f_mode & FMODE_OPENED); /* once it's opened, it's opened */
......
...@@ -2441,8 +2441,7 @@ enum { ...@@ -2441,8 +2441,7 @@ enum {
FILE_OPENED = 2 FILE_OPENED = 2
}; };
extern int finish_open(struct file *file, struct dentry *dentry, extern int finish_open(struct file *file, struct dentry *dentry,
int (*open)(struct inode *, struct file *), int (*open)(struct inode *, struct file *));
int *opened);
extern int finish_no_open(struct file *file, struct dentry *dentry); extern int finish_no_open(struct file *file, struct dentry *dentry);
/* fs/ioctl.c */ /* fs/ioctl.c */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册