Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1860832rwd; Fri, 9 Jun 2023 03:21:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4XoJUXfSsGUuLMqrg8JOKnyycRIgPpUQA/howqr2h0M4rC+ASbYGLMHKbY1LwHIfRZJMi8 X-Received: by 2002:a17:90a:35c:b0:258:9174:20ca with SMTP id 28-20020a17090a035c00b00258917420camr969903pjf.15.1686306085250; Fri, 09 Jun 2023 03:21:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686306085; cv=none; d=google.com; s=arc-20160816; b=f4fUz31ZhYuDTO2NPFJdgujJdPp681OGnpeYRjGB320PlIcg1jglXLuOeoGNf8V6je lo7b2XHAwnOJJP3zpzkKjlBNwTsTUMSzc37xrTzbPVas66YcuMjsefyLdcOt+YGadFoN NJAbFdcq7iEVTfHkqpjymBGm6GtmwV60Geg6HljJ3B8DrgmQhkx8pcHt4PfstEJ7940B BxrdeGDo9bVRVZxg++pO3NUNUIyAUZ125lk6USzXrX0uWZ9rQmWg9JPBBvdAo41QQMMx ujBSiadnGSnlEtQm3zsLGNZAi41dhPtj2fOLvbYC7BoRFEzsP5yqnrgubgNUDTB+K6ys 0dTw== 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=/ZEyoJlFLaVuWVBzkT1cBDONkmXP3qyfK5/dTNb2H5c=; b=VFWCEBN0AnHT1hs5LTYIX6QoCIJYvcA/5zBzSfuEjCCOBY76MbM5eLDSoGV99xGJBr Laio8xe/brz+H5mMpOf6q83rZ8I5deljd3JhL0xW3DLUX5OElz/VOOWmDYZrJ56qZhz0 xge10qExRVO1LnD29nrldmqnQyLANjrJ16NkhHv8kC79asUWwYb4ll9veHLgs8qURX79 lcnVKmnJoQqQZy2Fq10tjSOUROaW9YD8jNso/1NbU6djSqLMT7pQ1H99mW4wuynyZA5M Yii2OwS/R2Rg+EW02ZNqstPOhQxVQ/b2u5aStZoCw7RpiWN0kGNHuUQQ9eK44ssV2R1D 5bGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=cvK+95el; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i6-20020a17090ad34600b002563db5c4b0si4124930pjx.184.2023.06.09.03.21.12; Fri, 09 Jun 2023 03:21:25 -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=cvK+95el; 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 S240414AbjFIKLB (ORCPT + 99 others); Fri, 9 Jun 2023 06:11:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241379AbjFIKKT (ORCPT ); Fri, 9 Jun 2023 06:10:19 -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 F049E8698 for ; Fri, 9 Jun 2023 02:59:17 -0700 (PDT) Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) (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 159663F18A for ; Fri, 9 Jun 2023 09:32:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1686303170; bh=/ZEyoJlFLaVuWVBzkT1cBDONkmXP3qyfK5/dTNb2H5c=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=cvK+95elo2k3/jMqYxyonrhw0wwys5ZUxNM3rjPC98l3y4IZy7TRombROSqa/FWs5 tLhldCVPYTrK5o9lpuOqZvdxti+Whh7ueQnqUClwX8A6Ws5pJBDY4YwikJSmifqxBh Ao6MF5fZKP9kcqwZTe9tY86C2TX0TnvEtpRrT8KRVaBZzgeabrlaRg8wGInbAeryyp +AzhvQujwDPp5BRF0XdAVHAIOrYuP44HjYPmUbLB3Je0I8hVmsroYNUU6Bi0MhCvYP 4qX39swt+bfa7qEGP6eiu7PFnecUACgG006PO+nNXg2KEdEFIQwD7aaAs7gLyIqrhA whEu5fLO+2D3w== Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-9775f04de56so181934766b.2 for ; Fri, 09 Jun 2023 02:32:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686303167; x=1688895167; 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=/ZEyoJlFLaVuWVBzkT1cBDONkmXP3qyfK5/dTNb2H5c=; b=ecsIaN7siGBZ3M9swFfm43eQBIoWCetbSLOfgjhCiOMq1767ZQyojuzzpyCymp0CO7 9nKekk4qZ4+Uh777+9SyJtFk6BgUiXr0HGAd33QbMIoeJlwUk1oZ9xOsYhGa/a/L/pjR Qwye8k+fSig8UAXfavXG3FmhtTpeuPv6ONOgde7+Vaq8ObDM6ifeM5nOHiT2DT0aae9P UKG/G4+2WGI5S8nUTqn3MxjNtJkyfqBk8BVG9WXGYUesej2F8k6kdIQ5Y62Q2v+yOu/3 t3eusmY8KcdlzmQ6XbxjCfEcnUw1rLwAuWgAvb6mNEP05kd+sRe0Vak5VQDrNaz7ufNw pW1Q== X-Gm-Message-State: AC+VfDzxQAV1u5wfk28m1lJhzM6KtmWO2WYh/tgI+yjtzqiA0gMJ4PNM 3ktasB8P+2Vqjj6K1q5qIx5LrXd6AtCUbft15lBDNeOU7gvZtLtx5yzxP/T9ahqHbM44IVR6hpg BLucWmN9gs+SCEXUgJu6ed+2R2yytDzPr/TdAN/hCTQ== X-Received: by 2002:a17:906:4792:b0:96f:608c:5bdf with SMTP id cw18-20020a170906479200b0096f608c5bdfmr1229551ejc.64.1686303166889; Fri, 09 Jun 2023 02:32:46 -0700 (PDT) X-Received: by 2002:a17:906:4792:b0:96f:608c:5bdf with SMTP id cw18-20020a170906479200b0096f608c5bdfmr1229533ejc.64.1686303166625; Fri, 09 Jun 2023 02:32:46 -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 e25-20020a170906081900b0094ee3e4c934sm1031248ejd.221.2023.06.09.02.32.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Jun 2023 02:32:46 -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 v6 06/15] ceph: allow idmapped permission inode op Date: Fri, 9 Jun 2023 11:31:17 +0200 Message-Id: <20230609093125.252186-7-aleksandr.mikhalitsyn@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230609093125.252186-1-aleksandr.mikhalitsyn@canonical.com> References: <20230609093125.252186-1-aleksandr.mikhalitsyn@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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=unavailable 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: Christian Brauner Enable ceph_permission() 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/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 533349fe542f..f45d9c066523 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -2922,7 +2922,7 @@ int ceph_permission(struct mnt_idmap *idmap, struct inode *inode, err = ceph_do_getattr(inode, CEPH_CAP_AUTH_SHARED, false); if (!err) - err = generic_permission(&nop_mnt_idmap, inode, mask); + err = generic_permission(idmap, inode, mask); return err; } -- 2.34.1