From patchwork Mon Apr 30 22:51:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 906917 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="WIIKmrmR"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="mUrNsaCW"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40Zg444NBRz9s0n for ; Tue, 1 May 2018 09:00:20 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=lB7Vk+EVZSHUY8QHclhkJ0eNFyRenW8Itf1t4McnUXk=; b=WIIKmrmR4MR7BJ19+eWpsiP1vJ cnC3gBKuLtHrezV3MHHGpcf92fHYRhISPp2TcddPHHMYv1aoY+vtlTtxRAcv7bjOyyiMBGV1o8CR+ QXdGP00NNfTRRb0mmqqqxYox2OUeFY2EUcDDaF2NewqJWalgsP/Dw2s8fFsg/TO4pXajAlTYFB0Pq zrs71oSaIMWiq0iSxRETwCZOLTYr0qkvqMBu6hxwZk5bths4Qz3iDYKVRR7C4hF3XLCA76Fd7FBMH l7HFHJFVn1v9qW9Fhx1ZfynqoAqY2lzvwO3IRObBazfvJ1cOUeu0aNvv25VD8UDzCI3vGmtsmJnHS X0/pyP9w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fDHmF-0005tZ-Fd; Mon, 30 Apr 2018 23:00:11 +0000 Received: from mail-pg0-x242.google.com ([2607:f8b0:400e:c05::242]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fDHj1-0003mS-H5 for linux-mtd@lists.infradead.org; Mon, 30 Apr 2018 22:56:54 +0000 Received: by mail-pg0-x242.google.com with SMTP id b9-v6so7260276pgf.6 for ; Mon, 30 Apr 2018 15:56:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=rWq4cPPdQCFYQoyo0QJLdRvGhjAu9TOIwKtMH2FJG24=; b=mUrNsaCWbfWbLhMBTMe/5pKj7uDn/IyEsyUw+y8Gar0Mr5j8UT7KeEQvqKgjJ4+l8u SqKIyJyVYVnYA8SmBFDUS1UJUMbOWJekJG1NAsIPdqKqakOxtbjpMIsCsfU/QusrjFRH kyO52KEG4pGJ6Qd0m4dcZO3Cq97PCKBcguzwgj50VR1qPSzXB9vLtQ56K9cYQQgVDoBO YhycMHJ2d27+l8P+JLKLgd2pAboy0ZdTqVPfalw7mZH2XcjCEvI8kfgsgKeBdGjsSnYF umUhZcgOswjc0XBL/mwd3rCkduQkYF4jprzg+y6U0iKBu3+2we/ondLSKqzIBAm34XoD ImdQ== 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=rWq4cPPdQCFYQoyo0QJLdRvGhjAu9TOIwKtMH2FJG24=; b=RELAXfUe+DDB2ywG2dMFqmzjYU08jVM6tadyD/ESbMQltbPMTIx2+HLNG7mlKOy49l FgY9sjr9YGTgGHmfFRrLacBmSwri2BJR0xvlzHnuEpWbUf+gFk5zpms4fNi2az/a7eFx c4yFogQ8+RySDyBcuVyFT/qTUL7cGIL3ZI461Y/t/sgRLiUKlTMssy06eERh2b+JBu58 gSNbKeJh6hWORyY34LIOyrgSXV0+sBkzDB3k3I4zomVdGZeC/R9TOuW4o+0M1Qg39ZNn EbFUZYBHpCdzQXOCWfLyvy5zXNmNQueFp/crM+K7ql+AY0T87RqJEGyY2KF1WGkIlYIk wETw== X-Gm-Message-State: ALQs6tDxJwZsyDCba6sOAsIrsRiAS5zzxIlE0OACfXF43WsMuj7B8xAR 4AZVI3LsR4JxFCweJ4CA0c8= X-Google-Smtp-Source: AB8JxZoWsdiouwpGVTlUWcqWug2RTQhpstAJM5E/s61Dg6tJkOYkCisRnaTzE5l1nHkR1IZihhiXOA== X-Received: by 2002:a63:b406:: with SMTP id s6-v6mr11588424pgf.334.1525129000731; Mon, 30 Apr 2018 15:56:40 -0700 (PDT) Received: from ebiggers-linuxstation.kir.corp.google.com ([2620:15c:17:3:dc28:5c82:b905:e8a8]) by smtp.gmail.com with ESMTPSA id b15sm12969305pfi.111.2018.04.30.15.56.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Apr 2018 15:56:40 -0700 (PDT) From: Eric Biggers To: linux-fscrypt@vger.kernel.org, "Theodore Y . Ts'o" Subject: [PATCH 02/15] fscrypt: clean up after fscrypt_prepare_lookup() conversions Date: Mon, 30 Apr 2018 15:51:36 -0700 Message-Id: <20180430225149.183514-3-ebiggers3@gmail.com> X-Mailer: git-send-email 2.17.0.441.gb46fe60e1d-goog In-Reply-To: <20180430225149.183514-1-ebiggers3@gmail.com> References: <20180430225149.183514-1-ebiggers3@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180430_155651_597527_4FA41A6C X-CRM114-Status: GOOD ( 12.53 ) X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:400e:c05:0:0:0:242 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (ebiggers3[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (ebiggers3[at]gmail.com) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jaegeuk Kim , linux-ext4@vger.kernel.org, linux-mtd@lists.infradead.org, Eric Biggers , linux-f2fs-devel@lists.sourceforge.net MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Eric Biggers Now that all filesystems have been converted to use fscrypt_prepare_lookup(), we can remove the fscrypt_set_d_op() and fscrypt_set_encrypted_dentry() functions as well as un-export fscrypt_d_ops. Signed-off-by: Eric Biggers --- fs/crypto/crypto.c | 1 - fs/crypto/fscrypt_private.h | 1 + include/linux/fscrypt_notsupp.h | 10 ---------- include/linux/fscrypt_supp.h | 14 -------------- 4 files changed, 1 insertion(+), 25 deletions(-) diff --git a/fs/crypto/crypto.c b/fs/crypto/crypto.c index ce654526c0fb..f2b2d8408a01 100644 --- a/fs/crypto/crypto.c +++ b/fs/crypto/crypto.c @@ -353,7 +353,6 @@ static int fscrypt_d_revalidate(struct dentry *dentry, unsigned int flags) const struct dentry_operations fscrypt_d_ops = { .d_revalidate = fscrypt_d_revalidate, }; -EXPORT_SYMBOL(fscrypt_d_ops); void fscrypt_restore_control_page(struct page *page) { diff --git a/fs/crypto/fscrypt_private.h b/fs/crypto/fscrypt_private.h index ad6722bae8b7..fb96e493167b 100644 --- a/fs/crypto/fscrypt_private.h +++ b/fs/crypto/fscrypt_private.h @@ -106,6 +106,7 @@ extern int fscrypt_do_page_crypto(const struct inode *inode, gfp_t gfp_flags); extern struct page *fscrypt_alloc_bounce_page(struct fscrypt_ctx *ctx, gfp_t gfp_flags); +extern const struct dentry_operations fscrypt_d_ops; /* fname.c */ extern int fname_encrypt(struct inode *inode, const struct qstr *iname, diff --git a/include/linux/fscrypt_notsupp.h b/include/linux/fscrypt_notsupp.h index 44b50c04bae9..25b6492de6e5 100644 --- a/include/linux/fscrypt_notsupp.h +++ b/include/linux/fscrypt_notsupp.h @@ -64,16 +64,6 @@ static inline void fscrypt_restore_control_page(struct page *page) return; } -static inline void fscrypt_set_d_op(struct dentry *dentry) -{ - return; -} - -static inline void fscrypt_set_encrypted_dentry(struct dentry *dentry) -{ - return; -} - /* policy.c */ static inline int fscrypt_ioctl_set_policy(struct file *filp, const void __user *arg) diff --git a/include/linux/fscrypt_supp.h b/include/linux/fscrypt_supp.h index 477a7a6504d2..c9c2cc26bc62 100644 --- a/include/linux/fscrypt_supp.h +++ b/include/linux/fscrypt_supp.h @@ -74,20 +74,6 @@ static inline struct page *fscrypt_control_page(struct page *page) extern void fscrypt_restore_control_page(struct page *); -extern const struct dentry_operations fscrypt_d_ops; - -static inline void fscrypt_set_d_op(struct dentry *dentry) -{ - d_set_d_op(dentry, &fscrypt_d_ops); -} - -static inline void fscrypt_set_encrypted_dentry(struct dentry *dentry) -{ - spin_lock(&dentry->d_lock); - dentry->d_flags |= DCACHE_ENCRYPTED_WITH_KEY; - spin_unlock(&dentry->d_lock); -} - /* policy.c */ extern int fscrypt_ioctl_set_policy(struct file *, const void __user *); extern int fscrypt_ioctl_get_policy(struct file *, void __user *);