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=-9.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,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 42424C4332D for ; Sat, 21 Mar 2020 12:24:03 +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 1240F20722; Sat, 21 Mar 2020 12:24:03 +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="ca5vAWRt"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sf.net header.i=@sf.net header.b="kQ5KZlGF"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="qDGl6I5V" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1240F20722 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 1jFdAY-0006fj-Op; Sat, 21 Mar 2020 12:24:02 +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 1jFdAX-0006ez-A9 for linux-f2fs-devel@lists.sourceforge.net; Sat, 21 Mar 2020 12:24:01 +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: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:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=qrc2iJEb5igo5+A9CpNXuPvW8GnXYnuERAEkhVo4+ws=; b=ca5vAWRt9N6JyBjYBBHWub9MPj AtAOqUH4b1sQvtnJKtyEY1DKhfdkHYiHteKd5Yx0WZCQTCZz6r+Q93cyw42YmxdxfW/29Mw3ERdWj zm0ojbz0NuoNm7c94yI5pa13BwXyhIuN0N6YvkXXlh1pwZIZp/ucdQkRh7fOf1EBPPdQ=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version: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:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=qrc2iJEb5igo5+A9CpNXuPvW8GnXYnuERAEkhVo4+ws=; b=k Q5KZlGFHDBjPn9XkEgtcMWxK+QYxF3cyOcmfgdJYempMh0PwSBQk2ut2V4R/bDU9L3hW7TF/0sai4 SXGq9pAUYZMjL3/7GCdLtvkfx3iDQRpumPRzitFeV6Xene7Befx/GOqENYfG29mtdtE22K86UJEY1 tKiWEfThkwDNoNJE=; Received: from mail.kernel.org ([198.145.29.99]) by sfi-mx-4.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1jFdAV-002P8v-Il for linux-f2fs-devel@lists.sourceforge.net; Sat, 21 Mar 2020 12:24:01 +0000 Received: from localhost.localdomain (unknown [49.65.245.234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5EB3B20722; Sat, 21 Mar 2020 12:23:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584793431; bh=CLphnmsgUdhergwuL7TSo/4QUaTvu2i11XGuraVfcfM=; h=From:To:Cc:Subject:Date:From; b=qDGl6I5ValARktfRM5ZGaY1/IsvHQoZGLy0jwuPVkjVXk4gbZnWbaIjcPXg3YDy0w D06hW/4tHBdCcTCgpb5yHPpvjbjXaeB+jV7GIniNnWc83LKTizyvRsZd4mXl8JuQru wng+yST0rRDlle9MUr3Tnn3NunsFjZsAz/xP57/8= From: Chao Yu To: jaegeuk@kernel.org Date: Sat, 21 Mar 2020 20:23:27 +0800 Message-Id: <20200321122327.22522-1-chao@kernel.org> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 X-Headers-End: 1jFdAV-002P8v-Il Subject: [f2fs-dev] [PATCH] f2fs: don't call fscrypt_get_encryption_info() explicitly in f2fs_tmpfile() 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-kernel@vger.kernel.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: Chao Yu In f2fs_tmpfile(), parent inode's encryption info is only used when inheriting encryption context to its child inode, however, we have already called fscrypt_get_encryption_info() in fscrypt_inherit_context() to get the encryption info, so just removing unneeded one in f2fs_tmpfile(). Signed-off-by: Chao Yu --- fs/f2fs/namei.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index 95cfbce062e8..f54119da2217 100644 --- a/fs/f2fs/namei.c +++ b/fs/f2fs/namei.c @@ -874,12 +874,6 @@ static int f2fs_tmpfile(struct inode *dir, struct dentry *dentry, umode_t mode) if (!f2fs_is_checkpoint_ready(sbi)) return -ENOSPC; - if (IS_ENCRYPTED(dir) || DUMMY_ENCRYPTION_ENABLED(sbi)) { - int err = fscrypt_get_encryption_info(dir); - if (err) - return err; - } - return __f2fs_tmpfile(dir, dentry, mode, NULL); } -- 2.22.0 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel 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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, 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 B7525C4332D for ; Sat, 21 Mar 2020 12:23:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8B8B320757 for ; Sat, 21 Mar 2020 12:23:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584793433; bh=CLphnmsgUdhergwuL7TSo/4QUaTvu2i11XGuraVfcfM=; h=From:To:Cc:Subject:Date:List-ID:From; b=VXitzy2p+KXNwUHNhiGfXDnwehD8UDoXLdG+btLWlYhFT/rmwgUlfzgHPlWbVHCll wyn29Xn3I2eekL1sJF8MUMlkO7UeNqh613o23Jo+DNVy2LwQYVwSLPOZebKmcy6riV nztvkCWw0QQlYk6yD8IglFnB/U/f2wRrXWrKzQLQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727258AbgCUMXw (ORCPT ); Sat, 21 Mar 2020 08:23:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:56532 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725932AbgCUMXw (ORCPT ); Sat, 21 Mar 2020 08:23:52 -0400 Received: from localhost.localdomain (unknown [49.65.245.234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5EB3B20722; Sat, 21 Mar 2020 12:23:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584793431; bh=CLphnmsgUdhergwuL7TSo/4QUaTvu2i11XGuraVfcfM=; h=From:To:Cc:Subject:Date:From; b=qDGl6I5ValARktfRM5ZGaY1/IsvHQoZGLy0jwuPVkjVXk4gbZnWbaIjcPXg3YDy0w D06hW/4tHBdCcTCgpb5yHPpvjbjXaeB+jV7GIniNnWc83LKTizyvRsZd4mXl8JuQru wng+yST0rRDlle9MUr3Tnn3NunsFjZsAz/xP57/8= From: Chao Yu To: jaegeuk@kernel.org Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Chao Yu Subject: [PATCH] f2fs: don't call fscrypt_get_encryption_info() explicitly in f2fs_tmpfile() Date: Sat, 21 Mar 2020 20:23:27 +0800 Message-Id: <20200321122327.22522-1-chao@kernel.org> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chao Yu In f2fs_tmpfile(), parent inode's encryption info is only used when inheriting encryption context to its child inode, however, we have already called fscrypt_get_encryption_info() in fscrypt_inherit_context() to get the encryption info, so just removing unneeded one in f2fs_tmpfile(). Signed-off-by: Chao Yu --- fs/f2fs/namei.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index 95cfbce062e8..f54119da2217 100644 --- a/fs/f2fs/namei.c +++ b/fs/f2fs/namei.c @@ -874,12 +874,6 @@ static int f2fs_tmpfile(struct inode *dir, struct dentry *dentry, umode_t mode) if (!f2fs_is_checkpoint_ready(sbi)) return -ENOSPC; - if (IS_ENCRYPTED(dir) || DUMMY_ENCRYPTION_ENABLED(sbi)) { - int err = fscrypt_get_encryption_info(dir); - if (err) - return err; - } - return __f2fs_tmpfile(dir, dentry, mode, NULL); } -- 2.22.0