From patchwork Wed Jun 20 19:39:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Goldwyn Rodrigues X-Patchwork-Id: 10478621 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C5EA0601D7 for ; Wed, 20 Jun 2018 19:39:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B735628F5F for ; Wed, 20 Jun 2018 19:39:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ABE7828F67; Wed, 20 Jun 2018 19:39:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F7E128F5F for ; Wed, 20 Jun 2018 19:39:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932944AbeFTTj2 (ORCPT ); Wed, 20 Jun 2018 15:39:28 -0400 Received: from mx2.suse.de ([195.135.220.15]:52341 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932154AbeFTTjZ (ORCPT ); Wed, 20 Jun 2018 15:39:25 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id A6E14AD89; Wed, 20 Jun 2018 19:39:24 +0000 (UTC) From: Goldwyn Rodrigues To: linux-fsdevel@vger.kernel.org Cc: dhowells@redhat.com, viro@ZenIV.linux.org.uk, Goldwyn Rodrigues Subject: [PATCH 2/3] Revert: "VFS: Add a whiteout dentry type" Date: Wed, 20 Jun 2018 14:39:09 -0500 Message-Id: <20180620193910.6804-3-rgoldwyn@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20180620193910.6804-1-rgoldwyn@suse.de> References: <20180620193910.6804-1-rgoldwyn@suse.de> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Goldwyn Rodrigues 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 --- 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)