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=BAYES_00,DKIM_INVALID, DKIM_SIGNED,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 C6116C388F7 for ; Mon, 9 Nov 2020 17:00:49 +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 3CB2420789; Mon, 9 Nov 2020 17:00:49 +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="NLLJ1DFx"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sf.net header.i=@sf.net header.b="JMuMXJBw"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="K0z0S+1l" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3CB2420789 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 1kcAXA-0005CO-Q4; Mon, 09 Nov 2020 17:00:48 +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 1kcAXA-0005CB-9K for linux-f2fs-devel@lists.sourceforge.net; Mon, 09 Nov 2020 17:00:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: 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=/ZRTqep3fhPklzKsBTlIFP1q0Lon3rJufcANaDCf5J8=; b=NLLJ1DFxMdX/nv7Lndh00ajz+2 zYhFWJHVufUG2p8A3ksA+ksJRPYDTNTykrKOa88rKowQlZepggQLMZrPw2W2KEK4bEzMbMfckq2SY Oi6C4if27ZN35HJG118BpjNt8Gz4D+PUrOtt94jVATmvyzIXVifuMDsThd9Ok9Tn07v4=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To :From:Date:Sender:Reply-To:Content-Transfer-Encoding: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=/ZRTqep3fhPklzKsBTlIFP1q0Lon3rJufcANaDCf5J8=; b=JMuMXJBw4iFEcH7vd76MT7PzVo cDk5Q5GNZcBoTxnkZ64UXU2z8t54EdTCLB6trFUEY80KwOcvWzFv5v2dpHSH0CQQ8UeAmdvDkHVK5 gzTxmDiwLBBYXeH1WARZcoUKFf2NNSB+ravLs03VCQCofN+x6FmBytFDgBl3dQhJs2vY=; 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 1kcAX4-005pgG-HN for linux-f2fs-devel@lists.sourceforge.net; Mon, 09 Nov 2020 17:00:48 +0000 Received: from google.com (unknown [104.132.1.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D0B2E20809; Mon, 9 Nov 2020 17:00:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604941237; bh=bjONPyQjSWqtb8RSe2JNSEdnNR0aM/RcazfxhnrBinQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=K0z0S+1luyaFGtlhYEbEKUj2Bc+EyUgvnD4ecLtS5bxK1+MuXnD5zHW1+fjMwzfDV nFwT+nWYmkN34j7h564nR7JJrCABZH03vpLOazzrDiGHx7ZSbwK7EvRPiqWB0WpquL czPXQyBfs8NSkQR5cN99AR7K1lPS+yNt0ClbEFTQ= Date: Mon, 9 Nov 2020 09:00:35 -0800 From: Jaegeuk Kim To: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com Message-ID: <20201109170035.GA2129970@google.com> References: <20201109165914.2118360-1-jaegeuk@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201109165914.2118360-1-jaegeuk@kernel.org> X-Headers-End: 1kcAX4-005pgG-HN Subject: Re: [f2fs-dev] [PATCH] f2fs: avoid unneeded data copy in f2fs_ioc_move_range() 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net Sorry, please ignore this. On 11/09, Jaegeuk Kim wrote: > From: Chao Yu > > Fields in struct f2fs_move_range won't change in f2fs_ioc_move_range(), > let's avoid copying this structure's data to userspace. > > Signed-off-by: Chao Yu > Signed-off-by: Jaegeuk Kim > --- > fs/f2fs/file.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c > index 52417a2e3f4f..22ae8ae0072f 100644 > --- a/fs/f2fs/file.c > +++ b/fs/f2fs/file.c > @@ -2898,12 +2898,6 @@ static int f2fs_ioc_move_range(struct file *filp, unsigned long arg) > range.pos_out, range.len); > > mnt_drop_write_file(filp); > - if (err) > - goto err_out; > - > - if (copy_to_user((struct f2fs_move_range __user *)arg, > - &range, sizeof(range))) > - err = -EFAULT; > err_out: > fdput(dst); > return err; > -- > 2.29.2.222.g5d2a92d10f8-goog _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel