Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3159693imw; Mon, 11 Jul 2022 03:12:08 -0700 (PDT) X-Google-Smtp-Source: AGRyM1suQGIsH+Wkc3cwif4c0lOoB/IySuqwAAotmXhQmmHay2ZwNlqBhPxSyiSawNb38GJwzYg4 X-Received: by 2002:a17:90b:4f4d:b0:1ef:deb3:eb0c with SMTP id pj13-20020a17090b4f4d00b001efdeb3eb0cmr17180239pjb.168.1657534328441; Mon, 11 Jul 2022 03:12:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657534328; cv=none; d=google.com; s=arc-20160816; b=p0RsG1rp0cPPuRKdR37q+0LDaRlpgn4jlIN+lV+TcRP4G/KtJdu0DrRWeQ8Ms/g4Ia OVwsQPXfM9fIKedPI+yUfDXqhvGU3VtqSZwfGSrqUx/MxWLWrzmahc5YmqncKwtXvCHX daivVGLTkuibdrSjpQC4mFdBRnCX/JXJm4yuEVLD9onnhmUaTzlDKEdauxgSor8yIU4u IcSNVY89dMTEK8lBRDczWoShXN35MWOYmeD+FeAG0fuBV7D7akgnEmRQrJxIOvvk3+rv FktcapwkA+Qp1s7VwvkGtHTGV0rzppM1SPM5evJXuDSZVhnwNb6gSa1gBdbMqk6nQOts eBDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/FjEbGGI+bseIL4a70IltvzGhBkISNFs1qYUoNSBeY8=; b=TJWZe5rt/35r/E9DqpjvgRAybFu1tspwAoeinY6guIp0pScCdyeJGkug4KeE5N3eIm IdsdaLpLtfQ2rIwkm51Z+cTUVQlRvKSYMPAacZOhT/x8afjJv9gmahdMU2ykjsXilHyH ctc3vfIVVOTTJiAM37VBIBL48KhIJKMeUKjrRPidIa2k40W94YvLUi48g/0XRTWe8EK0 7dExiRsfEMfbB/I+e9NXJPib7g2nUUIKj6NDS1y8Kx7GCjbH8ZLpMIOd7oa3gtvGiMh/ ZGDXGZfuTLt8UCzVQH8DW/SD8id7F+vnZHMcxJKZH3uHUoqU82spUd7uDkWV94exuHlp zz8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ftk4c6WR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z7-20020a656647000000b004127aac55d2si9082524pgv.347.2022.07.11.03.11.56; Mon, 11 Jul 2022 03:12:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ftk4c6WR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229601AbiGKJIv (ORCPT + 99 others); Mon, 11 Jul 2022 05:08:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231154AbiGKJII (ORCPT ); Mon, 11 Jul 2022 05:08:08 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D51222253D; Mon, 11 Jul 2022 02:07:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 5E624B80D2C; Mon, 11 Jul 2022 09:07:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C4FD9C34115; Mon, 11 Jul 2022 09:07:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1657530457; bh=I+1qzEEFcQrKrVfMqDFwcSCOAGZs8oqZHD9xM5Q2sDE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ftk4c6WRe5KhF1a4Nip9iHTWz0rFOL6Zauc2KAs4Ye97mt35eteTP+k5KPzjvk5tE Seve13WIRwYt9wGxLttzruDXTMbsYQhi9xs29vGrWhF33fkVOd4PRlwh1xQ9Xa1XK4 D71zX4DwvJI6ovFZTS1SB6fgRDFtV0hZfl4nCDsg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paolo Bonzini , Eric Sandeen , "Darrick J. Wong" , Kuniyuki Iwashima Subject: [PATCH 4.14 11/17] xfs: remove incorrect ASSERT in xfs_rename Date: Mon, 11 Jul 2022 11:06:36 +0200 Message-Id: <20220711090536.598200765@linuxfoundation.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220711090536.245939953@linuxfoundation.org> References: <20220711090536.245939953@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Eric Sandeen commit e445976537ad139162980bee015b7364e5b64fff upstream. This ASSERT in xfs_rename is a) incorrect, because (RENAME_WHITEOUT|RENAME_NOREPLACE) is a valid combination, and b) unnecessary, because actual invalid flag combinations are already handled at the vfs level in do_renameat2() before we get called. So, remove it. Reported-by: Paolo Bonzini Signed-off-by: Eric Sandeen Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Fixes: 7dcf5c3e4527 ("xfs: add RENAME_WHITEOUT support") Signed-off-by: Kuniyuki Iwashima Acked-by: Darrick J. Wong Signed-off-by: Greg Kroah-Hartman --- fs/xfs/xfs_inode.c | 1 - 1 file changed, 1 deletion(-) --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c @@ -2964,7 +2964,6 @@ xfs_rename( * appropriately. */ if (flags & RENAME_WHITEOUT) { - ASSERT(!(flags & (RENAME_NOREPLACE | RENAME_EXCHANGE))); error = xfs_rename_alloc_whiteout(target_dp, &wip); if (error) return error;