From patchwork Thu Feb 22 23:56:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 10236629 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 8C99C6019D for ; Thu, 22 Feb 2018 23:56:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 837562908C for ; Thu, 22 Feb 2018 23:56:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7874F29090; Thu, 22 Feb 2018 23:56:57 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 0CFB82908C for ; Thu, 22 Feb 2018 23:56:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751755AbeBVX44 (ORCPT ); Thu, 22 Feb 2018 18:56:56 -0500 Received: from mail-it0-f67.google.com ([209.85.214.67]:54933 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751579AbeBVX4z (ORCPT ); Thu, 22 Feb 2018 18:56:55 -0500 Received: by mail-it0-f67.google.com with SMTP id p204so1046246itc.4 for ; Thu, 22 Feb 2018 15:56:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=m2/R8fSlU0bl4Hx4D8jqmItD2xskXbW+ywmq6atBNZA=; b=g3ZWfuTaxsCBwaDB7wLr/cC780GmEBbdhvS2+4OPaZny/Ts/ord5uw6N9ERwaZXn4I x1ovIjN2eKE+XPjl6uNrLikxFOWCnFvkWI+jYIZYMrtQuzhHeE2Nsz++MHYhz2GSDAdM RUQ4VuWbUrOZn8P/gCBWrrAJWEJiMlpT8w6n5nhSAghv403asKMBuaSN5vWnpeQa7wh3 2P/qNkaykiTpmNvZZA1nNAqSwkMe1K3Np4TcaBiuLaazetBFXhOoolW+r+fX6wmH9RTT Vgc783obX8DT5ZqA5FOGibSErg0f5Cz7pVTvegTCfi3c8ZA/MvOGffKkAWZBNYo7cEX7 15EA== 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; bh=m2/R8fSlU0bl4Hx4D8jqmItD2xskXbW+ywmq6atBNZA=; b=mjEMk9lToDDvz/ktcomofsb5AUO8nBRs7M+pF0RnV42e9HpUa/JM+1CHcYSz5uNfN9 INVmSw3OAsyAdtP/7QOCArBZL01k7IFUb42OyHhdngU2QXVSBmCxIwD49lIgGmtdciMC KqnFH4wUKl28e7AsdKFxUnJwP7hlqikEQ+0/m3F23NoW1en2DYpSt2QJiHbpKbubqoic 2SCUOLyvsF1Mok6f/IV1J/j5o9ehvrFq9DAnZFbu7czcvZ4i/1+qcs1WZRZ3vbCF0Pi1 QvUZ16xQcylhU+j6ywbVmAyXCVdoh5p+klvMv76JRxf3gFmzRaiTsG7bbHA5SeGatTc/ x+fA== X-Gm-Message-State: APf1xPAYCxnfaOprTXocL//tmlyJiEmPvUppvAmVInjDxo5W8AX8PjiE 2nxCkkMKGrIy6uLhivBJ+DPGyEI5 X-Google-Smtp-Source: AG47ELtiiqufRACQab5BE1i21sBP+yLaM1VjvtKF7y9hskkRXo2bG2ORCBe10Zf3Rs9HIa8i2LFKEA== X-Received: by 10.36.248.7 with SMTP id a7mr279782ith.10.1519343814347; Thu, 22 Feb 2018 15:56:54 -0800 (PST) Received: from ebiggers-linuxstation.kir.corp.google.com ([2620:15c:17:3:dc28:5c82:b905:e8a8]) by smtp.gmail.com with ESMTPSA id e94sm385266itd.21.2018.02.22.15.56.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Feb 2018 15:56:53 -0800 (PST) From: Eric Biggers To: linux-fscrypt@vger.kernel.org, "Theodore Y . Ts'o" Cc: Jaegeuk Kim , Eric Biggers Subject: [PATCH] fscrypt: clean up after fscrypt_prepare_lookup() conversions Date: Thu, 22 Feb 2018 15:56:01 -0800 Message-Id: <20180222235601.105764-1-ebiggers3@gmail.com> X-Mailer: git-send-email 2.16.1.291.g4437f3f132-goog 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 *);