From patchwork Fri Mar 3 17:11:35 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: 13159038 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 8ADF6C64EC4 for ; Fri, 3 Mar 2023 17:11:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231173AbjCCRLj (ORCPT ); Fri, 3 Mar 2023 12:11:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229726AbjCCRLj (ORCPT ); Fri, 3 Mar 2023 12:11:39 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46EDE1E5F7 for ; Fri, 3 Mar 2023 09:11:38 -0800 (PST) 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 073A8B81992 for ; Fri, 3 Mar 2023 17:11:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BC8A2C433D2; Fri, 3 Mar 2023 17:11:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1677863495; bh=7unI4aM4kWj0c4FF4eod83BtE4iRejRvVLdrHGZCPqI=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=K6Kc6kgCcdtQzNEOnCiXeEgmC9+lLNHteRJ2pZPlUDH/DTIKi8MDSoltvrIelH5Jy L2fe3ErbOw0HQClL83Dkq9PjUKc0k1zAikaQ7FcaUIKmYaxVuWszym3rbAHdeOpS+e hC7oNaURQtf3Qd2da4lC8+3aOrCg+UHlaFF9cNEDFSPKeNmOb215j3wcCB/T5ZOR/z VBOUAt++nvYJ0LrYsRYwgSQIPJQ7RRsIRcXZW1oi1f+HAHOCZOc/BbU7MehrefVKEw 5wSVkctkljyQBXbwj4VP8Y8RRgf246PRCS8ukrp3mdkaVyneTIOPcJHLU1wbey9NAg F9gBcYAyebmgA== Subject: [PATCH 03/13] xfs: preserve VLOOKUP in xfs_attr_set From: "Darrick J. Wong" To: djwong@kernel.org Cc: allison.henderson@oracle.com, linux-xfs@vger.kernel.org Date: Fri, 03 Mar 2023 09:11:35 -0800 Message-ID: <167786349536.1543331.16786039072000569273.stgit@magnolia> In-Reply-To: <167786347827.1543331.2803518928321606576.stgit@magnolia> References: <167786347827.1543331.2803518928321606576.stgit@magnolia> 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 --- fs/xfs/libxfs/xfs_attr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/xfs/libxfs/xfs_attr.c b/fs/xfs/libxfs/xfs_attr.c index 756d93526075..86672061c99e 100644 --- a/fs/xfs/libxfs/xfs_attr.c +++ b/fs/xfs/libxfs/xfs_attr.c @@ -999,11 +999,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_VLOOKUP); + args->op_flags |= XFS_DA_OP_OKNOENT; if (!is_remove) { XFS_STATS_INC(mp, xs_attr_set);