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: 10373035 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 D82C360234 for ; Mon, 30 Apr 2018 22:57:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C6CCC1FF83 for ; Mon, 30 Apr 2018 22:57:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BB0A1212DA; Mon, 30 Apr 2018 22:57:02 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 5DB0A1FF83 for ; Mon, 30 Apr 2018 22:57:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755345AbeD3W4p (ORCPT ); Mon, 30 Apr 2018 18:56:45 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:33273 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755282AbeD3W4l (ORCPT ); Mon, 30 Apr 2018 18:56:41 -0400 Received: by mail-pg0-f67.google.com with SMTP id i194-v6so7264522pgd.0; 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=pumZJr1PzaUjZx9kY4Pp1PrQXdpFD07ARMbPwrcCWo9CXiCshvuhjAtia9otthg98K 6yPTaeWENP0KkEjSN5eypay4HJQH6qnLJTlx/jVetB9Q/lxZ+qvy8DV9x03wWoZRoBzu +i/4EDpFKZFvArHttFqW/FAoxCCpWeeaTrDKMYktlydpr138PNNXglDgBi8r4QxH2NOy LiuBKxgv0Tv1XQ6LQzMSue7pV7pKiQKKuH647MEQNIeKXt22EM1zdiCC+vfkfT7HPiQs FX8Pr7M24gqpORdcJpBYZMAsWDE5Z9LzOJPi9zXzlIOzySPR7HUIdHbThrgrGSzk/mA0 +NHw== X-Gm-Message-State: ALQs6tCijDjsmNm7jL6RQcxKuYcjefSX4AjooW5LEEegFUzgoRQfcNE6 QOp3IkIr9uCl5w7t/H+1w1lvHGrk 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" Cc: Jaegeuk Kim , linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-mtd@lists.infradead.org, Eric Biggers 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> Sender: linux-fscrypt-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fscrypt@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 *);