Received: by 10.192.165.156 with SMTP id m28csp2079762imm; Thu, 12 Apr 2018 08:16:53 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/DsWMRzNg81V/HBTZ+fY1GqE+4/Kr2jUr92b0IoHIePclpV2I5O+zxhapI6KFJd4W52H89 X-Received: by 2002:a17:902:848c:: with SMTP id c12-v6mr1520210plo.316.1523546213545; Thu, 12 Apr 2018 08:16:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523546213; cv=none; d=google.com; s=arc-20160816; b=l9JjThyxdzeklUqsKGjlHSc9vigxzG+RAqSgs2IqNvwMzs6Q5yWYF6atJoFL64C48+ yZNiPnPGI4ecWJqo+impA29FVEUpNUM5WE56Gk/X5L8p5BpKy7mzN2qbI9p6BWRjVQmn zyXI9S9NhbbOEpBo2K0vdhwB/EVJpwiaa/QoDzAK5m8Ae7HVkapDvyTq4dOf+7+yIBFs Y/mPpZ5JFzquuN4soHm+b5Vg/20iOJ9Z4C1xB3pJdhloKYQgnvzyUJsCFVLjE1p97ig3 BxQXLhnQc8+fK1jyg6GWMotEDFA8xaU1A6++uxAhYwsLpbFATeo4mDIFRg35ZJd5bQY1 xTtg== 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=PYj6NQjaVI1iyXuau7ZTo9dP1cZsmsOzTg1fUaZufsw=; b=r4C2GebxeZun0fPXnAYznUl6Bp+lUjZTT7o4/iK8uunQGr9WcQYrHzzvyC1u9RAJcM Y9YkCH3NAOt6Wa8JQT8LHQOexpH5wAeeWaDPMFjEyJlA/Cy7dPO31zKtajnyTPN4fMc9 x5csYqAKRw1QuJOw26zr4k9D4fEHNECKC1ikdvM2BuZCuTymfRPtKt1MqxWohxeNyloi h/K8uy+bJPRrRvwLwmXSFl2rorOPJDkP/HdRG4zJF4TC5LZxzC73UxAOftD34zLFUhTk KNTp+/EL4Rcz3BPYT2CO/S6zt1HQMD6c52oQA3E4JagPhp2HNXWrsGxZ38FTfnJu5xaf Ul4g== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si2787303pfq.172.2018.04.12.08.16.16; Thu, 12 Apr 2018 08:16:53 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753645AbeDLPMK (ORCPT + 99 others); Thu, 12 Apr 2018 11:12:10 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:35833 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753662AbeDLPJF (ORCPT ); Thu, 12 Apr 2018 11:09:05 -0400 Received: by mail-wr0-f194.google.com with SMTP id o3so5475078wri.2 for ; Thu, 12 Apr 2018 08:09:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=PYj6NQjaVI1iyXuau7ZTo9dP1cZsmsOzTg1fUaZufsw=; b=OTE8eZtBevUyhjCQWtYkUt9riwE7WM/SRXVNA54oLqtITaO31/zP7+0kNJYbGLyj8C 4oj8sIZwLz8TeeBeFvBC4tULzMBBWiMfU4BtFVbTMEMyuj3si+RlpZmNNR/6DYOsRbIy dR/eeX/7LhGccg5bOCzodjNKKuqsqpxGstN1PCVb8KS3HWrbKfZxIeeg3Ri/lsAlBdGN TVieVqfjcDOzzTqZS8v6j6K/udeHMkUMI+znsttyzqZwf0ARZ+Pfu6RHaZSjthKc351q MEzHaeEvBYywYXgJtcKxtwMBgXTXnGW8GihDYtLDl0zXGy0USslWPY3EPy0nD4znScJ+ 0osw== X-Gm-Message-State: ALQs6tBcMiC5PjmT5LL+DtZx1oEwJIgRnwiPOQWH0UylB6Fyh4jjCQtO 3UjFigyh//7XCOF98XaVhl0+bA== X-Received: by 10.223.141.144 with SMTP id o16mr217564wrb.81.1523545744243; Thu, 12 Apr 2018 08:09:04 -0700 (PDT) Received: from veci.piliscsaba.redhat.com (catv-176-63-54-97.catv.broadband.hu. [176.63.54.97]) by smtp.gmail.com with ESMTPSA id p197sm2621783wme.43.2018.04.12.08.09.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Apr 2018 08:09:03 -0700 (PDT) From: Miklos Szeredi To: linux-unionfs@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 28/35] Revert "vfs: add flags to d_real()" Date: Thu, 12 Apr 2018 17:08:19 +0200 Message-Id: <20180412150826.20988-29-mszeredi@redhat.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180412150826.20988-1-mszeredi@redhat.com> References: <20180412150826.20988-1-mszeredi@redhat.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This reverts commit 495e642939114478a5237a7d91661ba93b76f15a. No user of "flags" argument of d_real() remain. Signed-off-by: Miklos Szeredi --- Documentation/filesystems/Locking | 2 +- Documentation/filesystems/vfs.txt | 2 +- fs/open.c | 2 +- fs/overlayfs/super.c | 4 ++-- include/linux/dcache.h | 11 +++++------ include/linux/fs.h | 2 +- 6 files changed, 11 insertions(+), 12 deletions(-) diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index 60e76060baff..a4afe96f0112 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking @@ -22,7 +22,7 @@ prototypes: struct vfsmount *(*d_automount)(struct path *path); int (*d_manage)(const struct path *, bool); struct dentry *(*d_real)(struct dentry *, const struct inode *, - unsigned int, unsigned int); + unsigned int); locking rules: rename_lock ->d_lock may block rcu-walk diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index 2bc77ea8aef4..af54d3651ff8 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt @@ -991,7 +991,7 @@ struct dentry_operations { struct vfsmount *(*d_automount)(struct path *); int (*d_manage)(const struct path *, bool); struct dentry *(*d_real)(struct dentry *, const struct inode *, - unsigned int, unsigned int); + unsigned int); }; d_revalidate: called when the VFS needs to revalidate a dentry. This diff --git a/fs/open.c b/fs/open.c index 00b1f18475ba..73f3d0f35742 100644 --- a/fs/open.c +++ b/fs/open.c @@ -96,7 +96,7 @@ long vfs_truncate(const struct path *path, loff_t length) * write access on the upper inode, not on the overlay inode. For * non-overlay filesystems d_real() is an identity function. */ - upperdentry = d_real(path->dentry, NULL, O_WRONLY, 0); + upperdentry = d_real(path->dentry, NULL, O_WRONLY); error = PTR_ERR(upperdentry); if (IS_ERR(upperdentry)) goto mnt_drop_write_and_out; diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index 006dc70d7425..7779fc610767 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c @@ -98,7 +98,7 @@ static int ovl_check_append_only(struct inode *inode, int flag) static struct dentry *ovl_d_real(struct dentry *dentry, const struct inode *inode, - unsigned int open_flags, unsigned int flags) + unsigned int open_flags) { struct dentry *real; int err; @@ -134,7 +134,7 @@ static struct dentry *ovl_d_real(struct dentry *dentry, goto bug; /* Handle recursion */ - real = d_real(real, inode, open_flags, 0); + real = d_real(real, inode, open_flags); if (!inode || inode == d_inode(real)) return real; diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 4c7ab11c627a..8ca25ea3b9db 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -148,7 +148,7 @@ struct dentry_operations { struct vfsmount *(*d_automount)(struct path *); int (*d_manage)(const struct path *, bool); struct dentry *(*d_real)(struct dentry *, const struct inode *, - unsigned int, unsigned int); + unsigned int); } ____cacheline_aligned; /* @@ -569,8 +569,7 @@ static inline struct dentry *d_backing_dentry(struct dentry *upper) * d_real - Return the real dentry * @dentry: the dentry to query * @inode: inode to select the dentry from multiple layers (can be NULL) - * @open_flags: open flags to control copy-up behavior - * @flags: flags to control what is returned by this function + * @flags: open flags to control copy-up behavior * * If dentry is on a union/overlay, then return the underlying, real dentry. * Otherwise return the dentry itself. @@ -579,10 +578,10 @@ static inline struct dentry *d_backing_dentry(struct dentry *upper) */ static inline struct dentry *d_real(struct dentry *dentry, const struct inode *inode, - unsigned int open_flags, unsigned int flags) + unsigned int flags) { if (unlikely(dentry->d_flags & DCACHE_OP_REAL)) - return dentry->d_op->d_real(dentry, inode, open_flags, flags); + return dentry->d_op->d_real(dentry, inode, flags); else return dentry; } @@ -597,7 +596,7 @@ static inline struct dentry *d_real(struct dentry *dentry, static inline struct inode *d_real_inode(const struct dentry *dentry) { /* This usage of d_real() results in const dentry */ - return d_backing_inode(d_real((struct dentry *) dentry, NULL, 0, 0)); + return d_backing_inode(d_real((struct dentry *) dentry, NULL, 0)); } struct name_snapshot { diff --git a/include/linux/fs.h b/include/linux/fs.h index 5e5dd484937f..5294697217b7 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1244,7 +1244,7 @@ static inline struct inode *file_inode(const struct file *f) static inline struct dentry *file_dentry(const struct file *file) { - return d_real(file->f_path.dentry, file_inode(file), 0, 0); + return d_real(file->f_path.dentry, file_inode(file), 0); } static inline int locks_lock_file_wait(struct file *filp, struct file_lock *fl) -- 2.14.3