getting rid of 'opened' argument of ->atomic_open() - part 2
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 8 Jun 2018 17:06:28 +0000 (13:06 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 12 Jul 2018 14:04:20 +0000 (10:04 -0400)
__gfs2_lookup(), gfs2_create_inode(), nfs_finish_open() and fuse_create_open()
don't need 'opened' anymore.  Get rid of that argument in those.

Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/fuse/dir.c
fs/gfs2/inode.c
fs/nfs/dir.c

index a5b1f5ff8cb761d6ec2e726a7bc7b6f0cd805efb..b8d7e9d423c8981efd0ae61cd2709ff30c3dcb17 100644 (file)
@@ -399,7 +399,7 @@ static struct dentry *fuse_lookup(struct inode *dir, struct dentry *entry,
  */
 static int fuse_create_open(struct inode *dir, struct dentry *entry,
                            struct file *file, unsigned flags,
-                           umode_t mode, int *opened)
+                           umode_t mode)
 {
        int err;
        struct inode *inode;
@@ -513,7 +513,7 @@ static int fuse_atomic_open(struct inode *dir, struct dentry *entry,
        if (fc->no_create)
                goto mknod;
 
-       err = fuse_create_open(dir, entry, file, flags, mode, opened);
+       err = fuse_create_open(dir, entry, file, flags, mode);
        if (err == -ENOSYS) {
                fc->no_create = 1;
                goto mknod;
index 59f695e96d6364f70992c34d7734ebe592fbb6cd..15e2a8a3b917fc79b81aca2827ab76990a11a22c 100644 (file)
@@ -580,7 +580,7 @@ static int gfs2_initxattrs(struct inode *inode, const struct xattr *xattr_array,
 static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
                             struct file *file,
                             umode_t mode, dev_t dev, const char *symname,
-                            unsigned int size, int excl, int *opened)
+                            unsigned int size, int excl)
 {
        const struct qstr *name = &dentry->d_name;
        struct posix_acl *default_acl, *acl;
@@ -822,7 +822,7 @@ fail:
 static int gfs2_create(struct inode *dir, struct dentry *dentry,
                       umode_t mode, bool excl)
 {
-       return gfs2_create_inode(dir, dentry, NULL, S_IFREG | mode, 0, NULL, 0, excl, NULL);
+       return gfs2_create_inode(dir, dentry, NULL, S_IFREG | mode, 0, NULL, 0, excl);
 }
 
 /**
@@ -830,14 +830,13 @@ static int gfs2_create(struct inode *dir, struct dentry *dentry,
  * @dir: The directory inode
  * @dentry: The dentry of the new inode
  * @file: File to be opened
- * @opened: atomic_open flags
  *
  *
  * Returns: errno
  */
 
 static struct dentry *__gfs2_lookup(struct inode *dir, struct dentry *dentry,
-                                   struct file *file, int *opened)
+                                   struct file *file)
 {
        struct inode *inode;
        struct dentry *d;
@@ -879,7 +878,7 @@ static struct dentry *__gfs2_lookup(struct inode *dir, struct dentry *dentry,
 static struct dentry *gfs2_lookup(struct inode *dir, struct dentry *dentry,
                                  unsigned flags)
 {
-       return __gfs2_lookup(dir, dentry, NULL, NULL);
+       return __gfs2_lookup(dir, dentry, NULL);
 }
 
 /**
@@ -1189,7 +1188,7 @@ static int gfs2_symlink(struct inode *dir, struct dentry *dentry,
        if (size >= gfs2_max_stuffed_size(GFS2_I(dir)))
                return -ENAMETOOLONG;
 
-       return gfs2_create_inode(dir, dentry, NULL, S_IFLNK | S_IRWXUGO, 0, symname, size, 0, NULL);
+       return gfs2_create_inode(dir, dentry, NULL, S_IFLNK | S_IRWXUGO, 0, symname, size, 0);
 }
 
 /**
@@ -1204,7 +1203,7 @@ static int gfs2_symlink(struct inode *dir, struct dentry *dentry,
 static int gfs2_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
 {
        unsigned dsize = gfs2_max_stuffed_size(GFS2_I(dir));
-       return gfs2_create_inode(dir, dentry, NULL, S_IFDIR | mode, 0, NULL, dsize, 0, NULL);
+       return gfs2_create_inode(dir, dentry, NULL, S_IFDIR | mode, 0, NULL, dsize, 0);
 }
 
 /**
@@ -1219,7 +1218,7 @@ static int gfs2_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
 static int gfs2_mknod(struct inode *dir, struct dentry *dentry, umode_t mode,
                      dev_t dev)
 {
-       return gfs2_create_inode(dir, dentry, NULL, mode, dev, NULL, 0, 0, NULL);
+       return gfs2_create_inode(dir, dentry, NULL, mode, dev, NULL, 0, 0);
 }
 
 /**
@@ -1244,7 +1243,7 @@ static int gfs2_atomic_open(struct inode *dir, struct dentry *dentry,
        if (!d_in_lookup(dentry))
                goto skip_lookup;
 
-       d = __gfs2_lookup(dir, dentry, file, opened);
+       d = __gfs2_lookup(dir, dentry, file);
        if (IS_ERR(d))
                return PTR_ERR(d);
        if (d != NULL)
@@ -1262,7 +1261,7 @@ skip_lookup:
        if (!(flags & O_CREAT))
                return -ENOENT;
 
-       return gfs2_create_inode(dir, dentry, file, S_IFREG | mode, 0, NULL, 0, excl, opened);
+       return gfs2_create_inode(dir, dentry, file, S_IFREG | mode, 0, NULL, 0, excl);
 }
 
 /*
index 22176a3818d54ba1353d739f9bb8f8fcb80ffd7c..71ae3cc3e53a8537858a0984b54dd5e33aa8f53d 100644 (file)
@@ -1434,8 +1434,7 @@ static int do_open(struct inode *inode, struct file *filp)
 
 static int nfs_finish_open(struct nfs_open_context *ctx,
                           struct dentry *dentry,
-                          struct file *file, unsigned open_flags,
-                          int *opened)
+                          struct file *file, unsigned open_flags)
 {
        int err;
 
@@ -1549,7 +1548,7 @@ int nfs_atomic_open(struct inode *dir, struct dentry *dentry,
                goto out;
        }
 
-       err = nfs_finish_open(ctx, ctx->dentry, file, open_flags, opened);
+       err = nfs_finish_open(ctx, ctx->dentry, file, open_flags);
        trace_nfs_atomic_open_exit(dir, ctx, open_flags, err);
        put_nfs_open_context(ctx);
 out: