get rid of 'opened' argument of ->atomic_open() - part 3
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 8 Jun 2018 17:32:02 +0000 (13:32 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 12 Jul 2018 14:04:20 +0000 (10:04 -0400)
now it can be done...

Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 files changed:
fs/9p/vfs_inode.c
fs/9p/vfs_inode_dotl.c
fs/bad_inode.c
fs/ceph/file.c
fs/ceph/super.h
fs/cifs/cifsfs.h
fs/cifs/dir.c
fs/fuse/dir.c
fs/gfs2/inode.c
fs/namei.c
fs/nfs/dir.c
fs/nfs/nfs4_fs.h
include/linux/fs.h

index 7b6ff3275d9c23d65d8b0314aad14f017d57086b..85ff859d3af5f36c5ad3ae1d8823e7c5d4f7c366 100644 (file)
@@ -859,8 +859,7 @@ struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry,
 
 static int
 v9fs_vfs_atomic_open(struct inode *dir, struct dentry *dentry,
-                    struct file *file, unsigned flags, umode_t mode,
-                    int *opened)
+                    struct file *file, unsigned flags, umode_t mode)
 {
        int err;
        u32 perm;
index c6939b7cb18c842c5f22f6321989df3aab96bce2..4823e1c4699945bf5c8170928dbaa6228c06995d 100644 (file)
@@ -241,8 +241,7 @@ v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, umode_t omode,
 
 static int
 v9fs_vfs_atomic_open_dotl(struct inode *dir, struct dentry *dentry,
-                         struct file *file, unsigned flags, umode_t omode,
-                         int *opened)
+                         struct file *file, unsigned flags, umode_t omode)
 {
        int err = 0;
        kgid_t gid;
index 125e8bbd22a250e3ea1c7710f29f942f7eaef150..8035d2a445617905b595222e2b5bb2d4f52b80d4 100644 (file)
@@ -134,7 +134,7 @@ static int bad_inode_update_time(struct inode *inode, struct timespec64 *time,
 
 static int bad_inode_atomic_open(struct inode *inode, struct dentry *dentry,
                                 struct file *file, unsigned int open_flag,
-                                umode_t create_mode, int *opened)
+                                umode_t create_mode)
 {
        return -EIO;
 }
index 38b28cb2fac171fffa2123dce60b8d1b540b1240..e2679e8a25358d0fc96ee7aca8d304ff204bea99 100644 (file)
@@ -429,8 +429,7 @@ out:
  * file or symlink, return 1 so the VFS can retry.
  */
 int ceph_atomic_open(struct inode *dir, struct dentry *dentry,
-                    struct file *file, unsigned flags, umode_t mode,
-                    int *opened)
+                    struct file *file, unsigned flags, umode_t mode)
 {
        struct ceph_fs_client *fsc = ceph_sb_to_client(dir->i_sb);
        struct ceph_mds_client *mdsc = fsc->mdsc;
index a7077a0c989fb33cde837a41e6b4d8b9951d2c43..971328b99edecc3ccb58421b6e458ca7fbb01278 100644 (file)
@@ -1025,8 +1025,7 @@ extern const struct file_operations ceph_file_fops;
 extern int ceph_renew_caps(struct inode *inode);
 extern int ceph_open(struct inode *inode, struct file *file);
 extern int ceph_atomic_open(struct inode *dir, struct dentry *dentry,
-                           struct file *file, unsigned flags, umode_t mode,
-                           int *opened);
+                           struct file *file, unsigned flags, umode_t mode);
 extern int ceph_release(struct inode *inode, struct file *filp);
 extern void ceph_fill_inline_data(struct inode *inode, struct page *locked_page,
                                  char *data, size_t len);
index 5f0231803431e26e6a32758ec5581feeb6e437de..f3a78efc31094f5cb34de2601744f46b7d9925ab 100644 (file)
@@ -65,8 +65,7 @@ extern struct inode *cifs_root_iget(struct super_block *);
 extern int cifs_create(struct inode *, struct dentry *, umode_t,
                       bool excl);
 extern int cifs_atomic_open(struct inode *, struct dentry *,
-                           struct file *, unsigned, umode_t,
-                           int *);
+                           struct file *, unsigned, umode_t);
 extern struct dentry *cifs_lookup(struct inode *, struct dentry *,
                                  unsigned int);
 extern int cifs_unlink(struct inode *dir, struct dentry *dentry);
index 891bfd62e67a2e177cbb41bb5cb6859d392b0e7f..3713d22b95a7011bda1e8701e5aea54fee96ea2a 100644 (file)
@@ -465,8 +465,7 @@ out_err:
 
 int
 cifs_atomic_open(struct inode *inode, struct dentry *direntry,
-                struct file *file, unsigned oflags, umode_t mode,
-                int *opened)
+                struct file *file, unsigned oflags, umode_t mode)
 {
        int rc;
        unsigned int xid;
index b8d7e9d423c8981efd0ae61cd2709ff30c3dcb17..c979329311c855b88d0669c34407e4fe4d12e5c2 100644 (file)
@@ -489,7 +489,7 @@ out_err:
 static int fuse_mknod(struct inode *, struct dentry *, umode_t, dev_t);
 static int fuse_atomic_open(struct inode *dir, struct dentry *entry,
                            struct file *file, unsigned flags,
-                           umode_t mode, int *opened)
+                           umode_t mode)
 {
        int err;
        struct fuse_conn *fc = get_fuse_conn(dir);
index 15e2a8a3b917fc79b81aca2827ab76990a11a22c..648f0ca1ad57e7893631d8c51f771aa47194fc7c 100644 (file)
@@ -1228,14 +1228,13 @@ static int gfs2_mknod(struct inode *dir, struct dentry *dentry, umode_t mode,
  * @file: The proposed new struct file
  * @flags: open flags
  * @mode: File mode
- * @opened: Flag to say whether the file has been opened or not
  *
  * Returns: error code or 0 for success
  */
 
 static int gfs2_atomic_open(struct inode *dir, struct dentry *dentry,
                            struct file *file, unsigned flags,
-                           umode_t mode, int *opened)
+                           umode_t mode)
 {
        struct dentry *d;
        bool excl = !!(flags & O_EXCL);
index 117b118853f26dc92f3db11305b29aead903e59a..1da272bf8ed3d556b0ef82b7f51cdc9bf0d7c137 100644 (file)
@@ -3052,8 +3052,7 @@ static int atomic_open(struct nameidata *nd, struct dentry *dentry,
        file->f_path.dentry = DENTRY_NOT_SET;
        file->f_path.mnt = nd->path.mnt;
        error = dir->i_op->atomic_open(dir, dentry, file,
-                                      open_to_namei_flags(open_flag),
-                                      mode, opened);
+                                      open_to_namei_flags(open_flag), mode);
        d_lookup_done(dentry);
        if (!error) {
                /*
index 71ae3cc3e53a8537858a0984b54dd5e33aa8f53d..f447b1a243505a776f637007c33272125f5a3446 100644 (file)
@@ -1451,7 +1451,7 @@ out:
 
 int nfs_atomic_open(struct inode *dir, struct dentry *dentry,
                    struct file *file, unsigned open_flags,
-                   umode_t mode, int *opened)
+                   umode_t mode)
 {
        DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wq);
        struct nfs_open_context *ctx;
index 137e18abb7e792660be11acf7b114213f71cd9a1..51beb6e38c9009e486344ac430c533a9f7e5bc3a 100644 (file)
@@ -258,7 +258,7 @@ extern const struct dentry_operations nfs4_dentry_operations;
 
 /* dir.c */
 int nfs_atomic_open(struct inode *, struct dentry *, struct file *,
-                   unsigned, umode_t, int *);
+                   unsigned, umode_t);
 
 /* super.c */
 extern struct file_system_type nfs4_fs_type;
index 70be3e4c26ac0ebc9fe68381425e5674a4bd00b3..c25896b30e9fad16361199edb3f59b9483006bd7 100644 (file)
@@ -1781,7 +1781,7 @@ struct inode_operations {
        int (*update_time)(struct inode *, struct timespec64 *, int);
        int (*atomic_open)(struct inode *, struct dentry *,
                           struct file *, unsigned open_flag,
-                          umode_t create_mode, int *opened);
+                          umode_t create_mode);
        int (*tmpfile) (struct inode *, struct dentry *, umode_t);
        int (*set_acl)(struct inode *, struct posix_acl *, int);
 } ____cacheline_aligned;