Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3356467pxb; Mon, 9 Nov 2020 09:05:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJz0gfNtaODEljt36PheZxq3Cqnti4LHoKsqK5wAODiA8KTi0z+Cc7fcFR+ueio5OZinNksJ X-Received: by 2002:a50:bb06:: with SMTP id y6mr16533137ede.278.1604941503884; Mon, 09 Nov 2020 09:05:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604941503; cv=none; d=google.com; s=arc-20160816; b=sKTQDp274XUY7/xr23feZE0dafVTSAffY9RTtLSqxVruQ3n38KP8OH23LiXmyW7nVS EW0clv2ErOxWxyN2afT9KtdG7Ja0PvxQU2YggiaxTnJrtGRFV0A+vAcyMKVG3SbZkD+k va381Cwnz0Kg3DUADQqna8TJhwdSeDQbl09Gf5jLVcKv3UQA89KKrIoXC8x6634Y9RZI OV+4SaKN9Ku2I/V4ddjB8zeUA0yaibG6Iu7Qo65e/SjLWV7QWaUIyWJuhP9Fsda69OjW jo36Az7Wg1gHVI3zJrpqnFGbE7jt8dzue2DHljlX2px/INkfYY4iqj1JDk+W+r2L3KYj 3PQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/ZRTqep3fhPklzKsBTlIFP1q0Lon3rJufcANaDCf5J8=; b=zyOqa1uAuAGUu0buDsKLVa/QTxGtxi7MXAmRuuLrcMukC33t2/N+njcLY8M7xQb3Li ye7hkgfE7cRX8Q/CDEYMtulCQvJXU8RUJhPPZz4w0Y6BABVGyWnShbUSzO4+keYvH6kn Yg4St4iTLuNHPgCxBhRQ674FjUgMAZWJmPa4rcDVFgFYQiR6VJucBTJdxqSfeYG5+wOp ZtV3EXXqmJFjrvWVd9A9hlPYslvFbzaI2idW2PQuZkZ4GfQOmYpvsmA8hxWZG33c+Yk5 RLcXQGqcrUmQB3yzK0gG0eARpgkLDq8csBSY/YY5zlM3y4lbyrJgRis1fmN61UU1TjsO Xkwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=K0z0S+1l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 a17si7287115ejv.205.2020.11.09.09.04.38; Mon, 09 Nov 2020 09:05:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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=K0z0S+1l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S1730773AbgKIRAh (ORCPT + 99 others); Mon, 9 Nov 2020 12:00:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:58360 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730513AbgKIRAh (ORCPT ); Mon, 9 Nov 2020 12:00:37 -0500 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 Cc: Chao Yu Subject: Re: [PATCH] f2fs: avoid unneeded data copy in f2fs_ioc_move_range() Message-ID: <20201109170035.GA2129970@google.com> References: <20201109165914.2118360-1-jaegeuk@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201109165914.2118360-1-jaegeuk@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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