From patchwork Thu Apr 6 19:29:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13203954 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 73499C7618D for ; Thu, 6 Apr 2023 19:29:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235839AbjDFT34 (ORCPT ); Thu, 6 Apr 2023 15:29:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236339AbjDFT3r (ORCPT ); Thu, 6 Apr 2023 15:29:47 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A112C3 for ; Thu, 6 Apr 2023 12:29:47 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 9696064B8B for ; Thu, 6 Apr 2023 19:29:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 007B2C433D2; Thu, 6 Apr 2023 19:29:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680809386; bh=3etMPV05LfjQTqKnICsuU/pZpDn58Nk9V7xTAnrQvcc=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=TT6wY9NJnsSf6/juJnXYvDnGXMjm8kJ8dEBcQekyJLd8kBorGsVzd/PiggEAiL7pk FnieaRf3OjyDK0eq3xKfObTl2iOFPtTQIeQG70Ul09/Ok2vVYdPSrTGXL8xbZL25Qs g45eAux5seEoEUFrydxFJVDm/7PYnzqCILRKVEbnXvDZB0jDWxnDnX6W2ql9+LD4IU 32+Xs7zTmH7aK23NmmaLGHH3aSYkjxJgIHfR2Q+bSrMarjZV0jRENglUFdZRi1Jwwg lNKE1Nj9N4RPJYuBr2u+LEzzWn9R60IFwL3ddfSmGsp0jvnnD6GYHkobOtDwjE4Ym0 +a7mXM5kjCnKQ== Date: Thu, 06 Apr 2023 12:29:45 -0700 Subject: [PATCH 03/10] xfs: preserve NVLOOKUP in xfs_attr_set From: "Darrick J. Wong" To: djwong@kernel.org Cc: allison.henderson@oracle.com, linux-xfs@vger.kernel.org Message-ID: <168080827155.616519.12584533588194937442.stgit@frogsfrogsfrogs> In-Reply-To: <168080827114.616519.13224581752144055912.stgit@frogsfrogsfrogs> References: <168080827114.616519.13224581752144055912.stgit@frogsfrogsfrogs> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Darrick J. Wong Preserve the attr-value lookup flag when calling xfs_attr_set. Normal xattr users will never use this, but parent pointer fsck will. Signed-off-by: Darrick J. Wong --- libxfs/xfs_attr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libxfs/xfs_attr.c b/libxfs/xfs_attr.c index 177962dec..7782f00c1 100644 --- a/libxfs/xfs_attr.c +++ b/libxfs/xfs_attr.c @@ -984,11 +984,11 @@ xfs_attr_set( /* * We have no control over the attribute names that userspace passes us * to remove, so we have to allow the name lookup prior to attribute - * removal to fail as well. Preserve the logged flag, since we need - * to pass that through to the logging code. + * removal to fail as well. Preserve the logged and vlookup flags, + * since we need to pass them through to the lower levels. */ - args->op_flags = XFS_DA_OP_OKNOENT | - (args->op_flags & XFS_DA_OP_LOGGED); + args->op_flags &= (XFS_DA_OP_LOGGED | XFS_DA_OP_NVLOOKUP); + args->op_flags |= XFS_DA_OP_OKNOENT; if (!is_remove) { XFS_STATS_INC(mp, xs_attr_set);