Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3658155pxb; Mon, 9 Nov 2020 17:55:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJzPhVW4YzfB85Smc1ek2TTzQvcrGWWX/51xy4VyP7vfMJLbn5Tr9R7m237tQxm7SaIUprTy X-Received: by 2002:a17:906:fca:: with SMTP id c10mr18645216ejk.128.1604973351242; Mon, 09 Nov 2020 17:55:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604973351; cv=none; d=google.com; s=arc-20160816; b=OPgKwDSWv+NulkRgcuNY1AA28ADOk9d9S1DtFOUs9gqy5NOdc3/DxVX6fVKGti3iAZ VR0XEYsBYS7u6TS1g44GHu1W1PX0do0lq44n+ol5/nHv9O1xQ+PAwAOtxq3AwzYChwPw I7MwC1QrismQUU4lZPpDCZYUFUBJWAkrKh7fKL5Leichin5djLgvd3f1uWnpfUtGeGIj 1MP0qlQYjm458E+OWGG5sVLv9AeSD4TTm9r869xsGG3TDXSLD9FN0eHjM3DT+ejydfJF aJq9TEj6tGDUH8MmcDLxZXXm0ilvpSSlWor4ip40YjP8eM+FjCo54L6lnHdcSXQ4manX hdOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=3dfUIVMqSxEwqx/2r70v/pd6g98fa/lB4pO50c/jvK8=; b=zuaI0/Lw2YmMgfcDRso+HrXeu8ZZgib+vhrIDpVEc7oYv1pCSsKNeJwnO4nhMke2hF T+DN6ZTbWiO3x+0Y5ZBQ8gZmF7GLq+CdEoweqiHZt/HHupWZsLz47O+iGo6wsxZvv2oG QYJNmmB7CHfnwFumEzUGM14qOfnN9dIo4Ibn3dSfnJhpB6eDKMW5uqmfCxMtMmeyevnm qiNwQnT3nEMghTq1SJwgMZkMRyOIDvQGbBAIFJ9wyrPooIhfmQ0NnpPKXLVqR829g5CC 4cGjYCUAhDU5sM3OufHQUbxt+UGyDrzSmBkeJ7opr4L7SatEt0ua4y/36R0yQv5IL4JH fsGg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cc10si10103379edb.156.2020.11.09.17.55.29; Mon, 09 Nov 2020 17:55:51 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730087AbgKJByL (ORCPT + 99 others); Mon, 9 Nov 2020 20:54:11 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:7509 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727311AbgKJByL (ORCPT ); Mon, 9 Nov 2020 20:54:11 -0500 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4CVWB14tvvzhjvx; Tue, 10 Nov 2020 09:54:01 +0800 (CST) Received: from [10.136.114.67] (10.136.114.67) by smtp.huawei.com (10.3.19.202) with Microsoft SMTP Server (TLS) id 14.3.487.0; Tue, 10 Nov 2020 09:54:08 +0800 Subject: Re: [f2fs-dev] [PATCH v4 2/2] f2fs: fix compat F2FS_IOC_{MOVE, GARBAGE_COLLECT}_RANGE To: Eric Biggers CC: Chao Yu , , , References: <20201106065331.76236-1-yuchao0@huawei.com> <20201106180324.GA78548@sol.localdomain> <20201107171635.GA841@sol.localdomain> <63efaa5c-bc19-4b16-653d-840bc6a6d9d1@huawei.com> <20201109181204.GA1232946@gmail.com> From: Chao Yu Message-ID: Date: Tue, 10 Nov 2020 09:54:07 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20201109181204.GA1232946@gmail.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.136.114.67] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/11/10 2:12, Eric Biggers wrote: > On Mon, Nov 09, 2020 at 10:29:25AM +0800, Chao Yu wrote: >>> Oh I see, the cp-related checks are at the beginning of f2fs_ioctl() too. >>> >>> In that case a much better approach would be to add __f2fs_ioctl() which is >>> called by f2fs_ioctl() and f2fs_compat_ioctl(), and have f2fs_ioctl() and >>> f2fs_compat_ioctl() do the cp-related checks but not __f2fs_ioctl(). >> >> Will this cleanup make sense to you? > > I think it would be better to do it the way I suggested. Updated in v5. Thanks, > > - Eric > . >