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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E1B47C433EF for ; Wed, 16 Feb 2022 21:41:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235247AbiBPVl4 (ORCPT ); Wed, 16 Feb 2022 16:41:56 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:35418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234794AbiBPVlz (ORCPT ); Wed, 16 Feb 2022 16:41:55 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EBE71ADAE for ; Wed, 16 Feb 2022 13:41:42 -0800 (PST) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id D059F2112A; Wed, 16 Feb 2022 21:41:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1645047700; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=58f8n9MP0qpX/i7+ps2nI1Rnr9LNH3hwRU4OKYHZJ2E=; b=doJoX4bN9uy+YB8OjdqxdI5Va2hck0aDw823+XoK6OxwF2npl6jB+wkcouUILU/lLxf7LQ JXZEGfp2N+RLDm4SKAmqqvNrAxwj+WjzwK1YbCrqK5Du9rZHkQKHuF+kaG47Ey6M6VmfAl v5S6CMYVWxk0LUZwtangtTm5kdBTPLg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1645047700; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=58f8n9MP0qpX/i7+ps2nI1Rnr9LNH3hwRU4OKYHZJ2E=; b=z65hhzWFW69u/L/YpscT9zE+8pcga3VyvOIJkhYjJJCzCq6dTExNTkx9m7kOqaYU9QszBw my1uiequVdw0sVCw== Received: from ds.suse.cz (ds.suse.cz [10.100.12.205]) by relay2.suse.de (Postfix) with ESMTP id C9737A3B87; Wed, 16 Feb 2022 21:41:40 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 106BDDA823; Wed, 16 Feb 2022 22:37:55 +0100 (CET) Date: Wed, 16 Feb 2022 22:37:55 +0100 From: David Sterba To: Josef Bacik Cc: linux-btrfs@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH] btrfs: remove the cross file system checks from remap Message-ID: <20220216213755.GR12643@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Josef Bacik , linux-btrfs@vger.kernel.org, kernel-team@fb.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On Wed, Feb 16, 2022 at 03:06:26PM -0500, Josef Bacik wrote: > This is handled in the generic VFS helper, we do not need to duplicate > this inside of btrfs. > > Signed-off-by: Josef Bacik > --- > fs/btrfs/reflink.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/fs/btrfs/reflink.c b/fs/btrfs/reflink.c > index a3930da4eb3f..4425030e09cb 100644 > --- a/fs/btrfs/reflink.c > +++ b/fs/btrfs/reflink.c > @@ -771,10 +771,6 @@ static int btrfs_remap_file_range_prep(struct file *file_in, loff_t pos_in, > > if (btrfs_root_readonly(root_out)) > return -EROFS; > - > - if (file_in->f_path.mnt != file_out->f_path.mnt || > - inode_in->i_sb != inode_out->i_sb) > - return -EXDEV; Should the super block check be at least an assert?