Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2067803pxu; Tue, 24 Nov 2020 16:27:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJyxWxfXrbtLG4u5E8OgNvXPqJ3ANWPPwhDsDtn+erhiE8DCXSn+J+buU44jjNym1Ww2OUna X-Received: by 2002:a05:6402:22c9:: with SMTP id dm9mr1085435edb.96.1606264037223; Tue, 24 Nov 2020 16:27:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606264037; cv=none; d=google.com; s=arc-20160816; b=H5wOVwlln5P7ssINrqmRyruYQWa2QKGjtUgqVNmZiYe2ZXJVi0dlAQL0YfJ0pt6Ile Ri7Dv4QSSUUL21eB0AvD2tEaF9T3+knq4qmcd448YFyqSWMZWZyRdHUBkFNlc4YwX0Me bTntDZqOxaBylnj/P+7sFLx03dSzcEDf/d0KXu+U8xU9v2Gxq0ybPlh5FG1HMyZnnc4Y BsxSP96cg4jgq2NjZqC4zee24djh3q8h2szz0jWDMcRZ1i3b090rEKiA8lcgRJsXsPDC 4tF6+kNabHt9XupHDRWVXYA75iATd+e7OiaDE8zSQGfKahOJSFDcoRAnGKeTYQ+ZqTVE cfSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=E6Y2GUQrl7l3+VaGadnnLAYONHPT0cZa/DEl6sZYVU8=; b=rR9MKKDyhQvhkp6QTR6bkJIfthpnjPJCIgl7FGhl8yyp43Wo6lQig8eph6EjbBlJgU D7BE+s+lzbaCDztGzcgJlsCsAm0elQgq3KvFs91AwUPqghaWHBBJJ2f3hyoN1+J9Gz/E j3CBYDE5C+nfkoBUcVVTiB2YpS9jfp5pVxhgmgTZleCnnE/MWA8iB1SXBP4UpDu2URh6 b6tG3XenX+3nVQOxS0QRL15/lWaoXI/UCfBc6LmzUS8RTmxJBu788a2YhJUbWyGci85D 85UDlhCGx2ttxyEqDlX1Vab1tDLTmT1ALIktQxTn0l0Hro3fDBbzuTCNyFqjKdLVyc39 aqbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Q8Hr4pEJ; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id be11si181512edb.164.2020.11.24.16.26.53; Tue, 24 Nov 2020 16:27:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Q8Hr4pEJ; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727417AbgKYAYw (ORCPT + 99 others); Tue, 24 Nov 2020 19:24:52 -0500 Received: from mail.kernel.org ([198.145.29.99]:35460 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727370AbgKYAYs (ORCPT ); Tue, 24 Nov 2020 19:24:48 -0500 Received: from sol.attlocal.net (172-10-235-113.lightspeed.sntcca.sbcglobal.net [172.10.235.113]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CB7B221741; Wed, 25 Nov 2020 00:24:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606263887; bh=vkE7h+iUKXjV3iZ6UKyjh74RIw0I8dTdzi+DtGmbbUg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q8Hr4pEJjWrF853VUCGWht1AfsKT2ByRq7EkZLk3ST0W88Ft8c5g+aDmZlRZkb3Ao pNIpg88N6acanGv9fJUVEenvHI2MW6dEQ5AXU91Uhz9UhD4neBNOsXTE/BilRpwcxk K7nOP0zDryiaAyBWv757MmUD+ZWi+BGM3UeNV0kE= From: Eric Biggers To: linux-fscrypt@vger.kernel.org Cc: linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-mtd@lists.infradead.org, linux-fsdevel@vger.kernel.org Subject: [PATCH 8/9] fscrypt: unexport fscrypt_get_encryption_info() Date: Tue, 24 Nov 2020 16:23:35 -0800 Message-Id: <20201125002336.274045-9-ebiggers@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201125002336.274045-1-ebiggers@kernel.org> References: <20201125002336.274045-1-ebiggers@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org From: Eric Biggers Now that fscrypt_get_encryption_info() is only called from files in fs/crypto/ (due to all key setup now being handled by higher-level helper functions instead of directly by filesystems), unexport it and move its declaration to fscrypt_private.h. Signed-off-by: Eric Biggers --- fs/crypto/fscrypt_private.h | 2 ++ fs/crypto/keysetup.c | 1 - include/linux/fscrypt.h | 7 +------ 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/fs/crypto/fscrypt_private.h b/fs/crypto/fscrypt_private.h index 16dd55080127..c1c302656c34 100644 --- a/fs/crypto/fscrypt_private.h +++ b/fs/crypto/fscrypt_private.h @@ -571,6 +571,8 @@ int fscrypt_derive_dirhash_key(struct fscrypt_info *ci, void fscrypt_hash_inode_number(struct fscrypt_info *ci, const struct fscrypt_master_key *mk); +int fscrypt_get_encryption_info(struct inode *inode); + /** * fscrypt_require_key() - require an inode's encryption key * @inode: the inode we need the key for diff --git a/fs/crypto/keysetup.c b/fs/crypto/keysetup.c index 50675b42d5b7..6339b3069a40 100644 --- a/fs/crypto/keysetup.c +++ b/fs/crypto/keysetup.c @@ -589,7 +589,6 @@ int fscrypt_get_encryption_info(struct inode *inode) res = 0; return res; } -EXPORT_SYMBOL(fscrypt_get_encryption_info); /** * fscrypt_prepare_new_inode() - prepare to create a new inode in a directory diff --git a/include/linux/fscrypt.h b/include/linux/fscrypt.h index a07610f27926..4b163f5e58e9 100644 --- a/include/linux/fscrypt.h +++ b/include/linux/fscrypt.h @@ -75,7 +75,7 @@ struct fscrypt_operations { static inline struct fscrypt_info *fscrypt_get_info(const struct inode *inode) { /* - * Pairs with the cmpxchg_release() in fscrypt_get_encryption_info(). + * Pairs with the cmpxchg_release() in fscrypt_setup_encryption_info(). * I.e., another task may publish ->i_crypt_info concurrently, executing * a RELEASE barrier. We need to use smp_load_acquire() here to safely * ACQUIRE the memory the other task published. @@ -200,7 +200,6 @@ int fscrypt_ioctl_remove_key_all_users(struct file *filp, void __user *arg); int fscrypt_ioctl_get_key_status(struct file *filp, void __user *arg); /* keysetup.c */ -int fscrypt_get_encryption_info(struct inode *inode); int fscrypt_prepare_new_inode(struct inode *dir, struct inode *inode, bool *encrypt_ret); void fscrypt_put_encryption_info(struct inode *inode); @@ -408,10 +407,6 @@ static inline int fscrypt_ioctl_get_key_status(struct file *filp, } /* keysetup.c */ -static inline int fscrypt_get_encryption_info(struct inode *inode) -{ - return -EOPNOTSUPP; -} static inline int fscrypt_prepare_new_inode(struct inode *dir, struct inode *inode, -- 2.29.2