linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Goldwyn Rodrigues <rgoldwyn@suse.de>
To: linux-fsdevel@vger.kernel.org
Cc: dhowells@redhat.com, viro@ZenIV.linux.org.uk,
	Goldwyn Rodrigues <rgoldwyn@suse.com>
Subject: [PATCH 2/3] Revert: "VFS: Add a whiteout dentry type"
Date: Wed, 20 Jun 2018 14:39:09 -0500	[thread overview]
Message-ID: <20180620193910.6804-3-rgoldwyn@suse.de> (raw)
In-Reply-To: <20180620193910.6804-1-rgoldwyn@suse.de>

From: Goldwyn Rodrigues <rgoldwyn@suse.com>

Reverts e7f7d2253c05 ("VFS: Add a whiteout dentry type")
No users of DCACHE_WHITEOUT_TYPE. Overlay uses its own
flags to represent whiteouts.

d_is_miss() is not used.

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
---
 include/linux/dcache.h | 21 +++++----------------
 1 file changed, 5 insertions(+), 16 deletions(-)

diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index 39d377ba4208..6bb1ba14af8d 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -202,13 +202,13 @@ struct dentry_operations {
 #define DCACHE_LRU_LIST			0x00080000
 
 #define DCACHE_ENTRY_TYPE		0x00700000
-#define DCACHE_MISS_TYPE		0x00000000 /* Negative dentry (maybe fallthru to nowhere) */
+#define DCACHE_MISS_TYPE		0x00000000 /* Negative dentry */
 #define DCACHE_WHITEOUT_TYPE		0x00100000 /* Whiteout dentry (stop pathwalk) */
 #define DCACHE_DIRECTORY_TYPE		0x00200000 /* Normal directory */
 #define DCACHE_AUTODIR_TYPE		0x00300000 /* Lookupless directory (presumed automount) */
-#define DCACHE_REGULAR_TYPE		0x00400000 /* Regular file type (or fallthru to such) */
-#define DCACHE_SPECIAL_TYPE		0x00500000 /* Other file type (or fallthru to such) */
-#define DCACHE_SYMLINK_TYPE		0x00600000 /* Symlink (or fallthru to such) */
+#define DCACHE_REGULAR_TYPE		0x00400000 /* Regular file type */
+#define DCACHE_SPECIAL_TYPE		0x00500000 /* Other file type */
+#define DCACHE_SYMLINK_TYPE		0x00600000 /* Symlink */
 
 #define DCACHE_MAY_FREE			0x00800000
 #define DCACHE_ENCRYPTED_WITH_KEY	0x02000000 /* dir is encrypted with a valid key */
@@ -393,16 +393,6 @@ static inline unsigned __d_entry_type(const struct dentry *dentry)
 	return dentry->d_flags & DCACHE_ENTRY_TYPE;
 }
 
-static inline bool d_is_miss(const struct dentry *dentry)
-{
-	return __d_entry_type(dentry) == DCACHE_MISS_TYPE;
-}
-
-static inline bool d_is_whiteout(const struct dentry *dentry)
-{
-	return __d_entry_type(dentry) == DCACHE_WHITEOUT_TYPE;
-}
-
 static inline bool d_can_lookup(const struct dentry *dentry)
 {
 	return __d_entry_type(dentry) == DCACHE_DIRECTORY_TYPE;
@@ -440,8 +430,7 @@ static inline bool d_is_file(const struct dentry *dentry)
 
 static inline bool d_is_negative(const struct dentry *dentry)
 {
-	// TODO: check d_is_whiteout(dentry) also.
-	return d_is_miss(dentry);
+	return __d_entry_type(dentry) == DCACHE_MISS_TYPE;
 }
 
 static inline bool d_is_positive(const struct dentry *dentry)
-- 
2.16.4

  parent reply	other threads:[~2018-06-20 19:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-20 19:39 [PATCH 0/3] VFS: Revert irrelevant dcache patches Goldwyn Rodrigues
2018-06-20 19:39 ` [PATCH 1/3] Revert: "VFS: Add a fallthrough flag for marking virtual dentries" Goldwyn Rodrigues
2018-06-20 19:39 ` Goldwyn Rodrigues [this message]
2018-06-20 19:39 ` [PATCH 3/3] VFS: call d_inode() from d_backing_inode() Goldwyn Rodrigues
2018-06-21 12:22   ` Christoph Hellwig
2018-06-21 12:58     ` Goldwyn Rodrigues
2018-06-21 13:01       ` Christoph Hellwig
2018-06-21 13:40       ` Amir Goldstein

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180620193910.6804-3-rgoldwyn@suse.de \
    --to=rgoldwyn@suse.de \
    --cc=dhowells@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=rgoldwyn@suse.com \
    --cc=viro@ZenIV.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).