Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3492602imm; Tue, 29 May 2018 08:09:23 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrOglBZ5xsCnMFJ/ygy4eiDHg7aDX9jhTL3t8GdpE7JY9RDjp5hlOAn5MtR7LELCSPChgIF X-Received: by 2002:a17:902:a716:: with SMTP id w22-v6mr17516375plq.215.1527606563074; Tue, 29 May 2018 08:09:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527606563; cv=none; d=google.com; s=arc-20160816; b=peeux2z/JlWi6fcun3Ww0Cx8/qxnS8WealkB8W2k1X+/de5QDqx20h1ewhXqnf3CLP gNsCh3PHVFjJi8PoOGx7eis5XUwxKechgY7ptNwKYDiuJeUXAwBOv2+r7ef9rHzvqnqS cC5WPysqqjuBr0u5I45vU7p5Kxvw5CU/beK9JsqTRULAu5PbmfLl9xpo4J52bVWBnLzu WpA5BaZPkI0iQ6r0r3HeCv4s/387/qMKF5Ah5sE6oPT+W9u56Cl4z9d2Vq5yEdRzkS32 KnpTnIJ/X4zMwrj2rEiAV+v/YW+MksOhBtQM9Dulz8SNkCw3Mej3e2wyQxvlQ+AiLaTj uzbg== 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=LkyoJruLjBuNui6wNidUQ4pGaBVoarKInB4lg2MHNBo=; b=XuJBt7c0+Itl0YpCVjMJqW45i3swqqcGKeh2OXLXI0zrwWiar8ji2LyYsyQsEtklm7 Ei+4wKF+c8t++vJqlWepJObgOnNVCy5I782RNk5EusuOObvopukKNzgilmMjUQq9Ge1E AXKL75GZqRpERw0KG4pifKCDAc2u9Mr22tEcI5IgBEHst4weCN4bwqjqyxZgd4y1W6Up TQeNekljtsEW7mySUJ6fptjpK1k98w9g6e/aFZQfEYGKjsesUGLYn0cqQYYHPBLCJ8bF QsvLM0I9AYGMt8/xpljBQI7UlI9N4tHLrfvzXWBozwrq7apRzQ7fbiZSFLJMmM35/jOZ eZ/A== 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 e11-v6si25627629pgu.459.2018.05.29.08.09.08; Tue, 29 May 2018 08:09:23 -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 S964934AbeE2PIu (ORCPT + 99 others); Tue, 29 May 2018 11:08:50 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:38261 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935844AbeE2OoZ (ORCPT ); Tue, 29 May 2018 10:44:25 -0400 Received: by mail-wm0-f68.google.com with SMTP id m129-v6so41264420wmb.3 for ; Tue, 29 May 2018 07:44:25 -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=LkyoJruLjBuNui6wNidUQ4pGaBVoarKInB4lg2MHNBo=; b=XHiK2V0fxih8j5yPwj718uskZgFz60RMc69arwpcMk2VJY9k7tknobeX+zAm446YhC n+KIn26eoxwA7gC6LGLC25CWjL0LRK+okXdp8auYNufzICwjgUjpZwlBfKzESvsZO7Ee HNCpJiiLvrD3I+oMhDKkR7Ml7r92f3i4r22TfmVTrkhb19Ub6lzfZelfD+S4tyoa/woO oSjWaZWHMDimWVy27lz4bJXrzvTvlrznqOLke6JRt3Zxo6IyCfaVBZa4loJK0fxTQBUg 6sXltmQzF5P8xxHnIjj1i8QvudFymkQowts8AAzDWJACY058OTI3UnO/VqLjmblpvKUO 3z8Q== X-Gm-Message-State: ALKqPwdf5PIkdwZzFA7RTwzt67o82R62MYlFzLPreqjR5hUk8+3YHHNH c3AemY3hBVObM6FQqM2vJePjXw== X-Received: by 2002:a1c:b4e:: with SMTP id 75-v6mr10656372wml.32.1527605064615; Tue, 29 May 2018 07:44:24 -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 t198-v6sm18834422wmt.23.2018.05.29.07.44.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 May 2018 07:44:24 -0700 (PDT) From: Miklos Szeredi To: linux-unionfs@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 35/39] Revert "vfs: add flags to d_real()" Date: Tue, 29 May 2018 16:43:35 +0200 Message-Id: <20180529144339.16538-36-mszeredi@redhat.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180529144339.16538-1-mszeredi@redhat.com> References: <20180529144339.16538-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 2db39216c393..127b49819afb 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 65ec661c60e6..4bca84a17c43 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 ddae4103d324..8fe4efa94af6 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -146,7 +146,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; /* @@ -568,8 +568,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. @@ -578,10 +577,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; } @@ -596,7 +595,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 96a4b9fd1f5f..797d6f28a8f0 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