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 7b6ff32..85ff859 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 c6939b7..4823e1c 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 125e8bb..8035d2a 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 38b28cb..e2679e8 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 a7077a0..971328b 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 5f02318..f3a78ef 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 891bfd6..3713d22 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 b8d7e9d..c979329 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 15e2a8a..648f0ca 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 117b118..1da272b 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 71ae3cc..f447b1a 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 137e18a..51beb6e 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 70be3e4..c25896b 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;