From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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=-16.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,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 446CCC6379D for ; Wed, 25 Nov 2020 00:25:41 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C96902151B; Wed, 25 Nov 2020 00:25:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sourceforge.net header.i=@sourceforge.net header.b="eBrCbyqU"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sf.net header.i=@sf.net header.b="OtW6akHC"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="s3OE/tak" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C96902151B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-f2fs-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1khict-0008BF-SF; Wed, 25 Nov 2020 00:25:39 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1khicK-00085N-4w for linux-f2fs-devel@lists.sourceforge.net; Wed, 25 Nov 2020 00:25:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Rz4j9oZxy0trP5Zx+eRPa28Y2vBAbJHQLW6j9D2CqpU=; b=eBrCbyqUS+FfvqIbPtmwRwVNAz t3LIIXnL1ObKrzchrkW6TW9DeMM5IJfP/Tftw8dFhd6BgXU6F7WweNOsTO4WcZfiJKI/Izv/RZv9Y 28IWvB3TkUx3OUC5HIFg+Ypu8U1/LoiEqJu6RV1S0wWMJFYBbJSxRpwAPMdyDdr7iHE8=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Rz4j9oZxy0trP5Zx+eRPa28Y2vBAbJHQLW6j9D2CqpU=; b=OtW6akHCxW/pGQ27YykhltEGaD LTG4XxacJ9CTpGTcpig6UvF6k9ev8yobDVvKZh3LBqMAMkHZRbK1C2lUzdDzQ5cIlU7zPLHq/zUww +69+9VYaUq8cPwvwu/vaLunJ9856bx/NVQPt4BTz+g5gCya3aPm/wKuvWyYIXe6AChHQ=; Received: from mail.kernel.org ([198.145.29.99]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1khic7-002qMA-Q8 for linux-f2fs-devel@lists.sourceforge.net; Wed, 25 Nov 2020 00:25:04 +0000 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 3E27A21527; Wed, 25 Nov 2020 00:24:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606263886; bh=kpsbU6nvcysiI9/MmbON23qqvHm2MWi7u1vlzska8vY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s3OE/takovt2yDXfnek5hfdpeePr6vwUSGTHUpP7IDS3ZkqY6FAGheOuo7Yjxb7DP nN15RjbMCAvWsymNtQqS3XE6yjq8XBjtiiK8BPKivoiGjhF6bd6qLlBVjov0wyf33A ldOVssWJJoNEU8DHoQc21MglO+vKlXsUcQloLo/A= From: Eric Biggers To: linux-fscrypt@vger.kernel.org Date: Tue, 24 Nov 2020 16:23:29 -0800 Message-Id: <20201125002336.274045-3-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 X-Headers-End: 1khic7-002qMA-Q8 Subject: [f2fs-dev] [PATCH 2/9] f2fs: remove f2fs_dir_open() X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-mtd@lists.infradead.org, linux-f2fs-devel@lists.sourceforge.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net From: Eric Biggers Since encrypted directories can be opened without their encryption key being available, and each readdir tries to set up the key, trying to set up the key in ->open() too isn't really useful. Just remove it so that directories don't need an ->open() method anymore, and so that we eliminate a use of fscrypt_get_encryption_info() (which I'd like to stop exporting to filesystems). Signed-off-by: Eric Biggers --- fs/f2fs/dir.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index 4b9ef8bbfa4a..47bee953fc8d 100644 --- a/fs/f2fs/dir.c +++ b/fs/f2fs/dir.c @@ -1081,19 +1081,11 @@ static int f2fs_readdir(struct file *file, struct dir_context *ctx) return err < 0 ? err : 0; } -static int f2fs_dir_open(struct inode *inode, struct file *filp) -{ - if (IS_ENCRYPTED(inode)) - return fscrypt_get_encryption_info(inode) ? -EACCES : 0; - return 0; -} - const struct file_operations f2fs_dir_operations = { .llseek = generic_file_llseek, .read = generic_read_dir, .iterate_shared = f2fs_readdir, .fsync = f2fs_sync_file, - .open = f2fs_dir_open, .unlocked_ioctl = f2fs_ioctl, #ifdef CONFIG_COMPAT .compat_ioctl = f2fs_compat_ioctl, -- 2.29.2 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel