Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2366429imm; Tue, 10 Jul 2018 19:26:16 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcvtiXiDzRCauNUecO7ev/uQNOLZHk3fx+R83M2ceEIb3XEM5kfgIY/LGva+TV+WkXryr7h X-Received: by 2002:a63:c312:: with SMTP id c18-v6mr18701058pgd.449.1531275976784; Tue, 10 Jul 2018 19:26:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531275976; cv=none; d=google.com; s=arc-20160816; b=dL3lzIf9JT1c2zdlvnoZRvGxJLs+Y9yWjKdY6AH5ombd+jmdE4AGBkBnsorWdoVOSF qYd0EWBrtuuRGfC4QRxoukByYBaXjeFiEeDuBVXifVY12aBMnMpsyRB7+OIx74i8jAnF Qjb8R3BAx+wyTf1zcoPOXhMxpUJdZDmIgcuf+ksVDgle+yZmCL3nXcQGizW+OS5WHByd EopSBKmkyU98bpaZg9w4tMDmA2g+gIw4U4Wit0oe34GqQ0OQo1cWJSzxFjA/y3dFhcMe XrnU8hNv+6ojYzXps+QPJOWMkJP1xtfnv2QjhBr0Ip8yRpK673tmD/Ae3tTBZFCksnay 1qIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=0mbfwUofNZv3pFTecWPkWdx14aShOQzhGgyqG/EeHgo=; b=ATAiMY4apufJEF+DRWzkoJGVWcdRODjJl6ooXA+Pbngvu0HGJLCXi7pPmW2H4h27F6 8tE7sa0pazQ2Vobc1T8S6K6AwqyCT+436mPBVtjE/IfDXNW1jRd5bI/DtkV2r+EFy7Zz Uga+VciC5x4x06NgHK0fzY0AJ+i8OpRU0cCopbotExiejiL1Ssrm+CLPmYmA3+JuClih sYXGVd9jrqQvx2kufXxZE3+uBp3S3A2LsX84PcLXX3d0+nysbb7UB5KKZau1fMHcEUbe 4OL9YhreE6DQKHpuxLxHzpt/XLx6jDq3KVR1Jr8/QC22+x6mwOYiHPnPb7YeE1eIkb2H MNmg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b13-v6si4375548pgh.255.2018.07.10.19.26.01; Tue, 10 Jul 2018 19:26:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732826AbeGKC0d (ORCPT + 99 others); Tue, 10 Jul 2018 22:26:33 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:45606 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732342AbeGKCYF (ORCPT ); Tue, 10 Jul 2018 22:24:05 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.87 #1 (Red Hat Linux)) id 1fd4lc-0003Ja-C2; Wed, 11 Jul 2018 02:22:08 +0000 From: Al Viro To: Linus Torvalds Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Miklos Szeredi Subject: [RFC][PATCH 21/42] getting rid of 'opened' argument of ->atomic_open() - part 2 Date: Wed, 11 Jul 2018 03:21:45 +0100 Message-Id: <20180711022206.12571-21-viro@ZenIV.linux.org.uk> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20180711022206.12571-1-viro@ZenIV.linux.org.uk> References: <20180711021136.GN30522@ZenIV.linux.org.uk> <20180711022206.12571-1-viro@ZenIV.linux.org.uk> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Al Viro __gfs2_lookup(), gfs2_create_inode(), nfs_finish_open() and fuse_create_open() don't need 'opened' anymore. Get rid of that argument in those. Signed-off-by: Al Viro --- fs/fuse/dir.c | 4 ++-- fs/gfs2/inode.c | 19 +++++++++---------- fs/nfs/dir.c | 5 ++--- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index a5b1f5ff8cb7..b8d7e9d423c8 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -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; diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index 59f695e96d63..15e2a8a3b917 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c @@ -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 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry, 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 @@ static int gfs2_atomic_open(struct inode *dir, struct dentry *dentry, 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); } /* diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 22176a3818d5..71ae3cc3e53a 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -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: -- 2.11.0