Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3404791pxb; Mon, 9 Nov 2020 10:14:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJwuQjMbL9hA74TfOqoOcgJz97USPtX039d78rPxFDeAEusIRxrdgfRPn2KTkmkq4ua//Dj8 X-Received: by 2002:a05:6402:1813:: with SMTP id g19mr16939259edy.105.1604945682928; Mon, 09 Nov 2020 10:14:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604945682; cv=none; d=google.com; s=arc-20160816; b=hwrtICKOELd0hD8tGPnfbUdFqX8UkBSMF1uw7oQcBffHW4i8Qj+Ye/WSQUXOQfTehU iyW1c4dGZYCy0o6yMfFK9R6rifQVK27NNevO5k0QQ8tfUEXrx7T3zWMATysCRpB98ro2 wyXGCUsYpE8wyiO2MyG6QFGA2xts8AtTWAclQ8QMi2h3TXlLsE6tAPzl/akCM7rQRM8J TSRQhVQAwZdQRLTdAaQaXLlffc5ehLEIIZPfktNlNsrJLuYQZ4lJF26seLV1GWevzWbQ PxDq0nABF2BUZ5xd9R3uyb7OpxPj8fKRAWv4g1hUjCXy+4/COoSzrVUN+CDduOonoWNx VznA== 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=R96JuBMLrFTBQG/c0iLhS/HZJQT+Dg307Dz2jWPuHus=; b=FXrXoontgHE7iOzvTg8xFnKvIX1oPlngux3TX0E8U0u7vLtF9+LDA8SES+OGk5Q819 gVkuLFhU1kv6DqJ+RrcxTBHMQnEQMyvZfkZTUUZ2iJNCSF39WDgWP0ieIN2stBj8MuZK xPBrsHN5YvQLj4lmwcFY5go9/nH5lhwS2gOQCWR4nvV3PoVYPwJ2bf/sIypHYufYANrf rY+gYsKrdjvmXptXYX6UF35IAiOCGGEtva3ZMQ4ItS5KstuBpoig6GG85HXnzN7O/lDZ 2/jjglxLNCFcoOO6q2R2j6I/DGt3nCapTzZckA2Ix27VxxXhDH3++zqhaT8csfh9gCO4 HESA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Wk08W6kN; 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 p14si7490102edm.185.2020.11.09.10.14.18; Mon, 09 Nov 2020 10:14:42 -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=Wk08W6kN; 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 S1730115AbgKISMH (ORCPT + 99 others); Mon, 9 Nov 2020 13:12:07 -0500 Received: from mail.kernel.org ([198.145.29.99]:51564 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729807AbgKISMG (ORCPT ); Mon, 9 Nov 2020 13:12:06 -0500 Received: from gmail.com (unknown [104.132.1.84]) (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 1BDC320644; Mon, 9 Nov 2020 18:12:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604945526; bh=tsjnf5mmTj0EScyRB7zrXWKWdSc7EtXrjBjYMukdyA4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Wk08W6kNcA29qf+RsYjb2LrGwZhhwDSeAhmCxNJn4RCzUGW5OUYPn655TQLeJMlVe ZndxtRZ8w2JIvhUauqKK0mf7xb4MpXDIYPENdxJcNOVmX1OfStAU92kXQ3F0UA+zDA 0wFNS0tflmZ2otx2JfzzijCE/b9ciaSYQmuy5HsA= Date: Mon, 9 Nov 2020 10:12:04 -0800 From: Eric Biggers To: Chao Yu Cc: Chao Yu , jaegeuk@kernel.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: Re: [f2fs-dev] [PATCH v4 2/2] f2fs: fix compat F2FS_IOC_{MOVE, GARBAGE_COLLECT}_RANGE Message-ID: <20201109181204.GA1232946@gmail.com> References: <20201106065331.76236-1-yuchao0@huawei.com> <20201106180324.GA78548@sol.localdomain> <20201107171635.GA841@sol.localdomain> <63efaa5c-bc19-4b16-653d-840bc6a6d9d1@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <63efaa5c-bc19-4b16-653d-840bc6a6d9d1@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. - Eric