Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3178365imw; Mon, 11 Jul 2022 03:39:17 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tVPAoPIiuIFzhFTm1u9Bx4DYvsZXICWLs71CGBhCTRiHaW6Nrhs6TZ0OmlYQPP3NyJ2cxL X-Received: by 2002:a17:907:d18:b0:726:3172:2266 with SMTP id gn24-20020a1709070d1800b0072631722266mr18031978ejc.476.1657535957591; Mon, 11 Jul 2022 03:39:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657535957; cv=none; d=google.com; s=arc-20160816; b=WKKZjCdLNIgz58tdBb5zSCFgoewe83T6h5o0G3VM+vUkWxggvjhgQ1apJa8FLyjxRo 5WgW6FPLq54gPJhQf1WDELYDBZDIGLaNBLcMoLOzzoJPwHjsXzsCAcB4tWqZApR5r25E OisSk9uuptxu0C7mO9IpzB2QMX8VSryTOMVdCTrGew8d8iW92QRbdD5hLhUByYbsQRVe aJWGrcTTl4B5WchuktNSd635s1iDrphgCl/5oxJd9xHeaLLTldsBVSb7OlIa9qgaPCxd VfQA/g0ugwYa5747P4shp2wLDy5DS7CvH5iVOQauBQp61j1P0tMD09qn30itTDjHDDZ0 tmgA== 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=kxFhP+YHIA1B223EWggjef7EjOjIox5F8B5IgvFS9ek=; b=axfEas5Hh3e/HAYZ76TuG05hYwr9z3lANLN0AUI41kG5QTbZnfjL4YViT9Kb1e46Mo /9jsQy81opoPRooRP45NgtpSOcWJdLRsz2FMajcbiyF2f2aQ5n/b+E7X2RChGgh/lcLs wYQjENeHEGYF5dO4809YnoxBZXH0y15QD0jpX+DwLPJJ2cCgDDT/fWej8gvMJiM/aq9+ 4A/WnPlxEM4E+3mna06nY2b4Cha/6vI57FgrapANKkvNuoOJrT78B3dqkMzkNCSxVw2o vgETo+7Nl5CdNo3ToT7hJUqomdryO6uYU6rGdV9o3fq6Ds3YryU2rXXMbkh4YVq0KaO6 c8nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=08xTpOiI; 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 we9-20020a170907234900b0072642bbc8cfsi7797914ejb.914.2022.07.11.03.38.49; Mon, 11 Jul 2022 03:39:17 -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=08xTpOiI; 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 S231367AbiGKJMS (ORCPT + 99 others); Mon, 11 Jul 2022 05:12:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231314AbiGKJLZ (ORCPT ); Mon, 11 Jul 2022 05:11:25 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42A9C21E1D; Mon, 11 Jul 2022 02:09:07 -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 A15D9B80D2C; Mon, 11 Jul 2022 09:09:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 02313C34115; Mon, 11 Jul 2022 09:09:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1657530544; bh=v5eUeA18m15U5X6LLB4bwYaPJNJlHiDo3j5eQplBYEQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=08xTpOiIXW9jW+BihsBRLPk50v86gLXtQzdVaKgViRR51eDTO4GvzS6KsvwwZPi/1 3vuYBa9r1e1MpDJmmsuqbQjeanEn+6XmVTok5J0KA58vXVbWEdEc1QCjw8RsE+E4Wy QTNcQHlMyuGHtKUrH/P8M/cmzlOxaNiHPd1tL+Vc= 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.19 15/31] xfs: remove incorrect ASSERT in xfs_rename Date: Mon, 11 Jul 2022 11:06:54 +0200 Message-Id: <20220711090538.299004397@linuxfoundation.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220711090537.841305347@linuxfoundation.org> References: <20220711090537.841305347@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 @@ -2899,7 +2899,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;