Message ID | 20210413175052.163865-2-jlayton@kernel.org (mailing list archive) |
---|---|
State | Superseded |
Headers | show
Return-Path: <linux-fscrypt-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 959CEC43461 for <linux-fscrypt@archiver.kernel.org>; Tue, 13 Apr 2021 17:50:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6943A613BC for <linux-fscrypt@archiver.kernel.org>; Tue, 13 Apr 2021 17:50:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347371AbhDMRvP (ORCPT <rfc822;linux-fscrypt@archiver.kernel.org>); Tue, 13 Apr 2021 13:51:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:44732 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238484AbhDMRvO (ORCPT <rfc822;linux-fscrypt@vger.kernel.org>); Tue, 13 Apr 2021 13:51:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D355E61176; Tue, 13 Apr 2021 17:50:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618336254; bh=A8Ma45wG5QAGaD9vkW/X6YWof3jHALAxoxiqod/wPyM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fPFMjTw3LatSmtZp5V8z54+S09pLUQkzbh4oaduo35BxGa0HnD5t54tRbB8Ep2BG8 S4oEYBGNt5t/8zaS4NxdNnv+V93xgfxv0IsYV4t26Ew2DF/wP1lEfwXZRFN4aoEHm3 GI1UVkFFuvkJ9lTdVXoR5ln9gcbJHN5Mvy+oSmR0woPwJNJuksUeVzyh1ovOzp1YUy qTKQ+tsh7YBfs1v+Gw15w0gGuUfyU3DxTmT/oq4t3ZBslbOpNyvoeSukrI1PlVYx4K XWxL4b2VkTyYNWYb9LyS80fZfz1EkNLsqTG2Vk4I6BNfl7AIkieP69lvMjSQO52Th8 6cMhlT0gcCPvg== From: Jeff Layton <jlayton@kernel.org> To: ceph-devel@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-fscrypt@vger.kernel.org, lhenriques@suse.de, Al Viro <viro@zeniv.linux.org.uk> Subject: [RFC PATCH v6 01/20] vfs: export new_inode_pseudo Date: Tue, 13 Apr 2021 13:50:33 -0400 Message-Id: <20210413175052.163865-2-jlayton@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210413175052.163865-1-jlayton@kernel.org> References: <20210413175052.163865-1-jlayton@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <linux-fscrypt.vger.kernel.org> X-Mailing-List: linux-fscrypt@vger.kernel.org |
Series |
ceph+fscrypt: context, filename and symlink support
|
expand
|
diff --git a/fs/inode.c b/fs/inode.c index a047ab306f9a..0745dc5d0924 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -935,6 +935,7 @@ struct inode *new_inode_pseudo(struct super_block *sb) } return inode; } +EXPORT_SYMBOL(new_inode_pseudo); /** * new_inode - obtain an inode
Ceph needs to be able to allocate inodes ahead of a create that might involve a fscrypt-encrypted inode. new_inode() almost fits the bill, but it puts the inode on the sb->s_inodes list and when we go to hash it, that might be done again. We could work around that by setting I_CREATING on the new inode, but that causes ilookup5 to return -ESTALE if something tries to find it before I_NEW is cleared. This is desirable behavior for most filesystems, but doesn't work for ceph. To work around all of this, just use new_inode_pseudo which doesn't add it to the sb->s_inodes list. Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Layton <jlayton@kernel.org> --- fs/inode.c | 1 + 1 file changed, 1 insertion(+)