From patchwork Wed Jun 7 18:09:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandr Mikhalitsyn X-Patchwork-Id: 104665 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp397166vqr; Wed, 7 Jun 2023 11:22:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4s+P/1gT3FlTTDdrEk4qf3DyTM+6L3tIiLkr1qEmLknNTYiaV8tPK2YMI7+/V00/1e6Cju X-Received: by 2002:a17:90a:1a51:b0:259:71f6:f82d with SMTP id 17-20020a17090a1a5100b0025971f6f82dmr7890431pjl.10.1686162148910; Wed, 07 Jun 2023 11:22:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686162148; cv=none; d=google.com; s=arc-20160816; b=wa53bwYs57a+RQc85jOw0+lBVyfJAMyGvZFywBPu2Va1yL8hD8TukMPBnLRbLmkSzP mJYaY8+9WErZB74eTVI3lzwE6n4+JzrYlp2VT0w2DDUqj5R6fjGdueIzstDkY3Y2u7fO Qt+gJ81pubXyLcB40i/MCjjYVC6rwCd4cFsuQfh+YU5rtk2e0gAAICl96W48AfUNDnIx xu9OygoGrKiC1RG3MQcRODpwKM2ExjA43sCy1zNlTCVMHjnnvBAHPHUMEcniB5dMS3ic hNSgjrK9ufjilyvOcr6u2feNAsDCC9CkjnLsqhAnsL8H4UWUUk6mdcLD8hVjXc4O8Qzr u7DQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/It8VSgZDTEKktJxHTMOOJHpvqL0RXNtakCJDr6cWYA=; b=lpQk61VjLmE8f5g8UVW5YOhgpX9y1x70eeU0PTvSzo7XdBm1SDSDyrnSn4kXiCE3rV AdhbWb7xUbnBnU1/C5uMtaRn0eX9NWsWwv/W7fKJ7zfoqEJ/ZSGRuwPGucSOET4YuE4o +3jBKYLbSt3DbKs71lUG3G0KaH9WFT3/QErtEVO2h9i/PGw8UIxF+WMZLfXsEw7pPNi5 yy5m6qUPOeaHOteQGgrZEqGfU/DBHieBCh6YZys9YZZwmHami2CXjZf71dZAaFC9ClE/ LZkvOYjwALuMJlnH3X/eD5m0nFfXRGAS9GMRMEzcqczlc4PTRCWnIFdiI1D++ycfKhq3 rl6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=Nf564hL3; 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=canonical.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l9-20020a17090a72c900b00256918d8db9si1472613pjk.17.2023.06.07.11.22.16; Wed, 07 Jun 2023 11:22:28 -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=@canonical.com header.s=20210705 header.b=Nf564hL3; 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=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232613AbjFGSLq (ORCPT + 99 others); Wed, 7 Jun 2023 14:11:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232786AbjFGSLI (ORCPT ); Wed, 7 Jun 2023 14:11:08 -0400 Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65EF5198B for ; Wed, 7 Jun 2023 11:11:02 -0700 (PDT) Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id B15C33F160 for ; Wed, 7 Jun 2023 18:11:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1686161460; bh=/It8VSgZDTEKktJxHTMOOJHpvqL0RXNtakCJDr6cWYA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Nf564hL3HighSIb53MZUbtQlmqRjV+eRENOiOgIVAY7A2mjoGJN93AKLatnzhf5T2 e0MlSLjS/vzjLVq0qApp3Hx9nw31e1ym3MnX1K9AUx98zi/BA2qInQxDzcWceQMsAX wkEp73eDf0cF2fRc8QQMUo50Z+dU41BR2gQxjSsKgzhQNXE/S252bWdce6jsSWhRqu qDGzovcY7iOtXu6izU1u+yDXOLzXgX6uMmYMu062MkLwf1sOnc8Hn88nnxFLUD1WWR V0DsQCWMZhvCm8TWjWrdJrkthNsDM9Wkq/gWbx16S15yq1JO7RrFsU3Jw2L3xMj6mN p8+3AnEW7+yyg== Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-977c516686aso503056466b.1 for ; Wed, 07 Jun 2023 11:11:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686161460; x=1688753460; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/It8VSgZDTEKktJxHTMOOJHpvqL0RXNtakCJDr6cWYA=; b=EZKATKUZ5pgFsxemmZzeNznGyRaThgda6Ony28IN2LdnJK5Wgf4ZhD3Uevf7ccInFm ODxnLKYa9L3DBE+h9zpEtq8BF7M1tvSmrBjqc/4CbgsFuZpiOGwvEMCOxsnQW94ODOFP Hsh38OWXH35hslcamFK0I+DeHco5NO9Zg+luKkVIl3QMV+AVf9eAu+SePtJHlPoKDnug Cof3F59X6X0HLC9ESrBAoDn34Vy2BFZIkmuOuUzDc2GkDVjvvB9S3j6WDs4XqmesA5be 1z2+8+ZOX+1tbFMCjFCDpJZiRUmHJ0WhkC9xNWKj+jITetxCGPx3bLUB6xKszWK+rvuu E/Sw== X-Gm-Message-State: AC+VfDyADx0Yx+0qkF7L0JdQlZ2ZNtkai8IBSTV5cUhYErP3nBfTex/d xGy8DJRz0TavGgur1FM3C3yPl1yzlRoNXjstlI9bJHq2+bjVhuq/KkELXkc94Ty60n1o+MXYO5r 9Pgb3nZBiwI29JqS9twvCDeSKis1S+F1aAECpdIJOoQ== X-Received: by 2002:a17:907:3e1e:b0:96f:b58e:7e21 with SMTP id hp30-20020a1709073e1e00b0096fb58e7e21mr7447663ejc.52.1686161460430; Wed, 07 Jun 2023 11:11:00 -0700 (PDT) X-Received: by 2002:a17:907:3e1e:b0:96f:b58e:7e21 with SMTP id hp30-20020a1709073e1e00b0096fb58e7e21mr7447637ejc.52.1686161460189; Wed, 07 Jun 2023 11:11:00 -0700 (PDT) Received: from amikhalitsyn.local (dslb-002-205-064-187.002.205.pools.vodafone-ip.de. [2.205.64.187]) by smtp.gmail.com with ESMTPSA id oz17-20020a170906cd1100b009745edfb7cbsm7170494ejb.45.2023.06.07.11.10.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jun 2023 11:10:59 -0700 (PDT) From: Alexander Mikhalitsyn To: xiubli@redhat.com Cc: brauner@kernel.org, stgraber@ubuntu.com, linux-fsdevel@vger.kernel.org, Christian Brauner , Jeff Layton , Ilya Dryomov , ceph-devel@vger.kernel.org, Alexander Mikhalitsyn , linux-kernel@vger.kernel.org Subject: [PATCH v4 12/14] ceph/acl: allow idmapped set_acl inode op Date: Wed, 7 Jun 2023 20:09:55 +0200 Message-Id: <20230607180958.645115-13-aleksandr.mikhalitsyn@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230607180958.645115-1-aleksandr.mikhalitsyn@canonical.com> References: <20230607180958.645115-1-aleksandr.mikhalitsyn@canonical.com> 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,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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?1768069161445414213?= X-GMAIL-MSGID: =?utf-8?q?1768069161445414213?= From: Christian Brauner Enable ceph_set_acl() to handle idmapped mounts. This is just a matter of passing down the mount's idmapping. Cc: Xiubo Li Cc: Jeff Layton Cc: Ilya Dryomov Cc: ceph-devel@vger.kernel.org Signed-off-by: Christian Brauner Signed-off-by: Alexander Mikhalitsyn --- fs/ceph/acl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ceph/acl.c b/fs/ceph/acl.c index 51ffef848429..d0ca5a0060d8 100644 --- a/fs/ceph/acl.c +++ b/fs/ceph/acl.c @@ -105,7 +105,7 @@ int ceph_set_acl(struct mnt_idmap *idmap, struct dentry *dentry, case ACL_TYPE_ACCESS: name = XATTR_NAME_POSIX_ACL_ACCESS; if (acl) { - ret = posix_acl_update_mode(&nop_mnt_idmap, inode, + ret = posix_acl_update_mode(idmap, inode, &new_mode, &acl); if (ret) goto out;