summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2018-06-08 11:44:56 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2018-07-12 10:04:19 -0400
commitbe12af3ef5e61ebc44d065e121424ac605d7bb8e (patch)
tree00f858b381e073359853abe0389bc7a51a8a5a06
parent6035a27b25ab9dadc8c3d5c5df5eae3fca62fc95 (diff)
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>
-rw-r--r--fs/9p/vfs_inode.c2
-rw-r--r--fs/9p/vfs_inode_dotl.c2
-rw-r--r--fs/ceph/file.c2
-rw-r--r--fs/cifs/dir.c2
-rw-r--r--fs/fuse/dir.c2
-rw-r--r--fs/gfs2/inode.c6
-rw-r--r--fs/namei.c2
-rw-r--r--fs/nfs/dir.c2
-rw-r--r--fs/open.c3
-rw-r--r--include/linux/fs.h3
10 files changed, 12 insertions, 14 deletions
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 566929792480..7b6ff3275d9c 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -917,7 +917,7 @@ v9fs_vfs_atomic_open(struct inode *dir, struct dentry *dentry,
917 v9inode->writeback_fid = (void *) inode_fid; 917 v9inode->writeback_fid = (void *) inode_fid;
918 } 918 }
919 mutex_unlock(&v9inode->v_mutex); 919 mutex_unlock(&v9inode->v_mutex);
920 err = finish_open(file, dentry, generic_file_open, opened); 920 err = finish_open(file, dentry, generic_file_open);
921 if (err) 921 if (err)
922 goto error; 922 goto error;
923 923
diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c
index ee65db5c7eb0..c6939b7cb18c 100644
--- a/fs/9p/vfs_inode_dotl.c
+++ b/fs/9p/vfs_inode_dotl.c
@@ -352,7 +352,7 @@ v9fs_vfs_atomic_open_dotl(struct inode *dir, struct dentry *dentry,
352 } 352 }
353 mutex_unlock(&v9inode->v_mutex); 353 mutex_unlock(&v9inode->v_mutex);
354 /* Since we are opening a file, assign the open fid to the file */ 354 /* Since we are opening a file, assign the open fid to the file */
355 err = finish_open(file, dentry, generic_file_open, opened); 355 err = finish_open(file, dentry, generic_file_open);
356 if (err) 356 if (err)
357 goto err_clunk_old_fid; 357 goto err_clunk_old_fid;
358 file->private_data = ofid; 358 file->private_data = ofid;
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index 38a63fff7903..38b28cb2fac1 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -509,7 +509,7 @@ int ceph_atomic_open(struct inode *dir, struct dentry *dentry,
509 ceph_init_inode_acls(d_inode(dentry), &acls); 509 ceph_init_inode_acls(d_inode(dentry), &acls);
510 file->f_mode |= FMODE_CREATED; 510 file->f_mode |= FMODE_CREATED;
511 } 511 }
512 err = finish_open(file, dentry, ceph_open, opened); 512 err = finish_open(file, dentry, ceph_open);
513 } 513 }
514out_req: 514out_req:
515 if (!req->r_err && req->r_target_inode) 515 if (!req->r_err && req->r_target_inode)
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index 21d7e393900e..891bfd62e67a 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -541,7 +541,7 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry,
541 if ((oflags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL)) 541 if ((oflags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
542 file->f_mode |= FMODE_CREATED; 542 file->f_mode |= FMODE_CREATED;
543 543
544 rc = finish_open(file, direntry, generic_file_open, opened); 544 rc = finish_open(file, direntry, generic_file_open);
545 if (rc) { 545 if (rc) {
546 if (server->ops->close) 546 if (server->ops->close)
547 server->ops->close(xid, tcon, &fid); 547 server->ops->close(xid, tcon, &fid);
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index d4bdcf51e6cb..a5b1f5ff8cb7 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -469,7 +469,7 @@ static int fuse_create_open(struct inode *dir, struct dentry *entry,
469 d_instantiate(entry, inode); 469 d_instantiate(entry, inode);
470 fuse_change_entry_timeout(entry, &outentry); 470 fuse_change_entry_timeout(entry, &outentry);
471 fuse_invalidate_attr(dir); 471 fuse_invalidate_attr(dir);
472 err = finish_open(file, entry, generic_file_open, opened); 472 err = finish_open(file, entry, generic_file_open);
473 if (err) { 473 if (err) {
474 fuse_sync_release(ff, flags); 474 fuse_sync_release(ff, flags);
475 } else { 475 } else {
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index 4aba00a6004b..59f695e96d63 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -626,7 +626,7 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
626 error = 0; 626 error = 0;
627 if (file) { 627 if (file) {
628 if (S_ISREG(inode->i_mode)) 628 if (S_ISREG(inode->i_mode))
629 error = finish_open(file, dentry, gfs2_open_common, opened); 629 error = finish_open(file, dentry, gfs2_open_common);
630 else 630 else
631 error = finish_no_open(file, NULL); 631 error = finish_no_open(file, NULL);
632 } 632 }
@@ -768,7 +768,7 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
768 d_instantiate(dentry, inode); 768 d_instantiate(dentry, inode);
769 if (file) { 769 if (file) {
770 file->f_mode |= FMODE_CREATED; 770 file->f_mode |= FMODE_CREATED;
771 error = finish_open(file, dentry, gfs2_open_common, opened); 771 error = finish_open(file, dentry, gfs2_open_common);
772 } 772 }
773 gfs2_glock_dq_uninit(ghs); 773 gfs2_glock_dq_uninit(ghs);
774 gfs2_glock_dq_uninit(ghs + 1); 774 gfs2_glock_dq_uninit(ghs + 1);
@@ -866,7 +866,7 @@ static struct dentry *__gfs2_lookup(struct inode *dir, struct dentry *dentry,
866 return d; 866 return d;
867 } 867 }
868 if (file && S_ISREG(inode->i_mode)) 868 if (file && S_ISREG(inode->i_mode))
869 error = finish_open(file, dentry, gfs2_open_common, opened); 869 error = finish_open(file, dentry, gfs2_open_common);
870 870
871 gfs2_glock_dq_uninit(&gh); 871 gfs2_glock_dq_uninit(&gh);
872 if (error) { 872 if (error) {
diff --git a/fs/namei.c b/fs/namei.c
index d2aeb282ed05..117b118853f2 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -3475,7 +3475,7 @@ static int do_tmpfile(struct nameidata *nd, unsigned flags,
3475 if (error) 3475 if (error)
3476 goto out2; 3476 goto out2;
3477 file->f_path.mnt = path.mnt; 3477 file->f_path.mnt = path.mnt;
3478 error = finish_open(file, child, NULL, opened); 3478 error = finish_open(file, child, NULL);
3479out2: 3479out2:
3480 mnt_drop_write(path.mnt); 3480 mnt_drop_write(path.mnt);
3481out: 3481out:
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 0ac50983fc4e..22176a3818d5 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1439,7 +1439,7 @@ static int nfs_finish_open(struct nfs_open_context *ctx,
1439{ 1439{
1440 int err; 1440 int err;
1441 1441
1442 err = finish_open(file, dentry, do_open, opened); 1442 err = finish_open(file, dentry, do_open);
1443 if (err) 1443 if (err)
1444 goto out; 1444 goto out;
1445 if (S_ISREG(file->f_path.dentry->d_inode->i_mode)) 1445 if (S_ISREG(file->f_path.dentry->d_inode->i_mode))
diff --git a/fs/open.c b/fs/open.c
index d2030a3c5c52..dbaac9efc7fc 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -843,8 +843,7 @@ cleanup_file:
843 * Returns zero on success or -errno if the open failed. 843 * Returns zero on success or -errno if the open failed.
844 */ 844 */
845int finish_open(struct file *file, struct dentry *dentry, 845int finish_open(struct file *file, struct dentry *dentry,
846 int (*open)(struct inode *, struct file *), 846 int (*open)(struct inode *, struct file *))
847 int *opened)
848{ 847{
849 BUG_ON(file->f_mode & FMODE_OPENED); /* once it's opened, it's opened */ 848 BUG_ON(file->f_mode & FMODE_OPENED); /* once it's opened, it's opened */
850 849
diff --git a/include/linux/fs.h b/include/linux/fs.h
index ca668c7e48a7..70be3e4c26ac 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2441,8 +2441,7 @@ enum {
2441 FILE_OPENED = 2 2441 FILE_OPENED = 2
2442}; 2442};
2443extern int finish_open(struct file *file, struct dentry *dentry, 2443extern int finish_open(struct file *file, struct dentry *dentry,
2444 int (*open)(struct inode *, struct file *), 2444 int (*open)(struct inode *, struct file *));
2445 int *opened);
2446extern int finish_no_open(struct file *file, struct dentry *dentry); 2445extern int finish_no_open(struct file *file, struct dentry *dentry);
2447 2446
2448/* fs/ioctl.c */ 2447/* fs/ioctl.c */