From patchwork Thu Apr 13 14:46:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 83016 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1097451vqo; Thu, 13 Apr 2023 07:58:28 -0700 (PDT) X-Google-Smtp-Source: AKy350ZT+zjwbLml8SVvmZa6sGUUo/iOIOZnf7sgcVQ0oWXATnpUcyzKHXarIUPsiDRGFUl4I/WY X-Received: by 2002:a17:903:2487:b0:1a4:f295:32fa with SMTP id p7-20020a170903248700b001a4f29532famr2933064plw.15.1681397907885; Thu, 13 Apr 2023 07:58:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681397907; cv=none; d=google.com; s=arc-20160816; b=jtOA/ZDY5t//WaXz7/Kqmdc4y+E9nQ/TqqMnlYGrwaq4cH4SB/yORJZ5rPX/9b+hIp LI27OddGTiHKKQcSbLUCzYDCS+oRoe/eJk6CBFKsAgnpIx4Bf7BR+IIVEZAR6XXzGvSv AslJLpLJzoJmY1J01IuRySpLPtes99L8RdpyUZ8bRNQG1be1ih0Y0JolZaJ9ekkShKpZ Te8if5ppeFBoCPN1yPYzAb7JzcqbAgNw8/N29BQ9mCujdPIob4ROmg2JxW7w9up88UzN pkGACc5fYIPAP0EzR1nAsJU/wTb41Lyd4Du8grMZJ+/lzZvsuVmgtC2Rdfl1rsyFt0pv nYQQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=vR6OiC90LYrQT6o7GRGqE92FNskV+7v9nJS4y5TiZLU=; b=Qdpai84oZj7/oKIl0pjx8cPC7xf1bffgKkbqS1Y41taYRlwYfu9SsNHh633/D+SNeT hrPm1yLmbPVNjTjmJtXpSZo73HJ3aNOqrTZ6lZAPvDWfos0xpOMUF0HZ6G58ZdJo3//7 gmz83ZTh40kmtWyU+kVZH6mC2gClaPCabE0AZuwZLb6d7AImj3WFCZkAYjxoqGawfuut u1OpnD7j8LWH0kXL/QK936bD4Gz480E+VscDofKio4HW+286Hf/AuvFlHTwR/iK3a9DQ pGdGx/kgXpHAlReU0vZrDehKl6pQGc0qBK5XY0z2dCBKUYSylxAxsJCqFZn1oxi04JV6 LPEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qbujdr7G; 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=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p3-20020a170902bd0300b00192bac60af2si2102695pls.473.2023.04.13.07.58.11; Thu, 13 Apr 2023 07:58:27 -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=@kernel.org header.s=k20201202 header.b=qbujdr7G; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230408AbjDMOr2 (ORCPT + 99 others); Thu, 13 Apr 2023 10:47:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231472AbjDMOrN (ORCPT ); Thu, 13 Apr 2023 10:47:13 -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 ECB8DA250; Thu, 13 Apr 2023 07:46:56 -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 7E2A663F36; Thu, 13 Apr 2023 14:46:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7BFF2C433EF; Thu, 13 Apr 2023 14:46:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681397215; bh=sD6MHcpYAz7We+U724CzFeQCJalgnzUEbBogL3Or51A=; h=From:To:Cc:Subject:Date:From; b=qbujdr7GRVbl7JYDHkho8At2w1sMdCSmby2FLYLenTm3vmBtZa0pKGB2gEydEPDFj zPkB2O/jWsyHjr5yEUT9kFNucxu7XyPI30O2ldm6wi+0V5YdBElATYIn7xO1b3Kc+z fJXgIYYLqbEAiwrwrECmu2mMI+88Q8GtzYwjp3UCitt4/0ctqJTvctNoMqhlIqvZlV hwecA3q+uNfhKqx4GRH3fSpc2UwUi47qspGtIjixej8GrFlS7bln3RrF/BgBHZvT0u rIMzzFE9O7fgx9AE1YGYpp4XmRLKiOin2qZTCDnTFXqaLbwN7N8RH7NtHZT6fTse8d FRzHbW1fZRTtA== From: broonie@kernel.org To: Gao Xiang Cc: Christian Brauner , Gao Xiang , Jingbo Xu , Linux Kernel Mailing List , Linux Next Mailing List Subject: linux-next: manual merge of the erofs tree with the vfs-idmapping tree Date: Thu, 13 Apr 2023 15:46:51 +0100 Message-Id: <20230413144651.3519980-1-broonie@kernel.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763073492209027061?= X-GMAIL-MSGID: =?utf-8?q?1763073492209027061?= Hi all, Today's linux-next merge of the erofs tree got a conflict in: fs/erofs/xattr.c between commit: a5488f29835c0 ("fs: simplify ->listxattr() implementation") from the vfs-idmapping tree and commit: 303f50cf89b24 ("erofs: handle long xattr name prefixes properly") from the erofs tree. I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts. +++ b/fs/erofs/xattr.c @@@ -483,12 -517,28 +513,26 @@@ static int xattr_entrylist(struct xattr { struct listxattr_iter *it = container_of(_it, struct listxattr_iter, it); - unsigned int prefix_len; - const char *prefix; + unsigned int base_index = entry->e_name_index; + unsigned int prefix_len, infix_len = 0; + const char *prefix, *infix = NULL; + const struct xattr_handler *h; + + if (entry->e_name_index & EROFS_XATTR_LONG_PREFIX) { + struct erofs_sb_info *sbi = EROFS_SB(_it->sb); + struct erofs_xattr_prefix_item *pf = sbi->xattr_prefixes + + (entry->e_name_index & EROFS_XATTR_LONG_PREFIX_MASK); + + if (pf >= sbi->xattr_prefixes + sbi->xattr_prefix_count) + return 1; + infix = pf->prefix->infix; + infix_len = pf->infix_len; + base_index = pf->prefix->base_index; + } - prefix = erofs_xattr_prefix(entry->e_name_index, it->dentry); - if (!prefix) + h = erofs_xattr_handler(base_index); + if (!h || (h->list && !h->list(it->dentry))) return 1; - - prefix = xattr_prefix(h); prefix_len = strlen(prefix); if (!it->buffer) { diff --cc fs/erofs/xattr.c index 015462763bdd5,a04724c816e5f..0000000000000 --- a/fs/erofs/xattr.c