Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp943128rwd; Wed, 7 Jun 2023 08:53:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5CKpUxTnlOs2ApTqpVoUeq4Dct0L0EDd8NgL3RoC4MdTc4umdt73WzRGC/p2lhPS3Gs3K4 X-Received: by 2002:a05:6a20:1581:b0:110:b0ab:8798 with SMTP id h1-20020a056a20158100b00110b0ab8798mr2537454pzj.36.1686153199451; Wed, 07 Jun 2023 08:53:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686153199; cv=none; d=google.com; s=arc-20160816; b=iCjqN3s87W8H9fGWM1NMNZSj+36PaDFKDympQHqtCw1LfAhxhGKX7rn8LJBDLQBD1K osy4SrP/AClMO85GroBBZj8X2NcZATifmQsiSczAkupO14uoKbN8w7qR8hG0zZg9XW9n vOXb21kdtkD7KRASXZBXMQQEfKlxmU55wr0Zh1dKwfGyvcxl5wUkJIp6iFl1hnMQB4Z6 eONuJO+x2p0exTx07A2V7nt2cgz1VeMDl1bE61h+7G3T5+oCOeYFlYN9Q2L8Ewj5suWX YvXdLETvrV6unKACIZEDOo1QXP6NGtlneBrnPFxxJ/1rU14HSw+tM6PcS6zGfRzt8fuz 63dQ== 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=Yx9DhBwZ0J2oRahK7SO/c3VRSYe4JEpen4id9pbwqa8=; b=bDL7ww2BMxi61yVCDP0lDtrdQeBr8m1/++KdZ7KhRm+Uy/KnQLEm9VNJLEmZTzo92A VLU3B+GX87ac9ArFofG6v37tP+0E8ugU0c7xvgk0zoZRY1WAqyT/RlGyc/YbtqKsjkkv YSOXbVTiOi0wKKvh0zV1Vp01jdNgT+b52GGO88+v5OAFqNKqP2xP92czRcEgpb/065tz o2rGfDPSEgFHaq/ZF709bpdwVlCWkceaZIM7yMKLd3c/LlXrKO1kb0F8YCDPnBJD3D5J FEvu5qFty4y35FzPRbUJuUacPPn6MpNp6I0hocGDLKvJZziNGOuSF6s0K4+69I/kPxiF zm0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=X9R0mgs0; 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 c7-20020a633507000000b00543971e3b35si6193442pga.779.2023.06.07.08.53.04; Wed, 07 Jun 2023 08:53:19 -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=X9R0mgs0; 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 S241443AbjFGPWZ (ORCPT + 99 others); Wed, 7 Jun 2023 11:22:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241340AbjFGPV6 (ORCPT ); Wed, 7 Jun 2023 11:21:58 -0400 Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C1352139 for ; Wed, 7 Jun 2023 08:21:37 -0700 (PDT) Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) (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-1.canonical.com (Postfix) with ESMTPS id E3CC53F166 for ; Wed, 7 Jun 2023 15:21:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1686151295; bh=Yx9DhBwZ0J2oRahK7SO/c3VRSYe4JEpen4id9pbwqa8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=X9R0mgs06C1Gk2+anYw8kNZDpb5tRPWIghtL4PrsomqyLbHxWqU1194+mHRvi7T/k Iu0suS19pA22bYmPvt/KPPSi9CKE/R3aDYyGTYfyvOjbmY8SFmGnh/A2oEdx1Mj3Ue 6UVUMo+JxNYy19cRt/lV6FEfcureUVPiElJay9oCyT6jfS2Di2Mr8N4vJj6cVsbDJd 2JxtmpSvrXAUS0d2SoWjaqVVacA2thOsSAAUg27AmuMpURk+wywG3GhZvG1s3C0B59 Y1KDNMuEgi85234LflbxZ5mZ1vR1RMv6kRUTtENu/HKYDbBT797pw3JWmqxU+/AJOk 9BqRqAwy7KTYw== Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-970e0152da7so672998766b.2 for ; Wed, 07 Jun 2023 08:21:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686151295; x=1688743295; 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=Yx9DhBwZ0J2oRahK7SO/c3VRSYe4JEpen4id9pbwqa8=; b=NTP2B/D1e63QXizLF4F1IRyFJSViZ9OJT8gk02YcbSZgtSGbuHwBf8fJcWl/Z0cFng 6EFyhgBXsn1CKlknKoZKXyNsB3eKHil+qXXdRx/a28zYHlkYK+L0zb6DI33wIWlPnBeW kiTIMIblN61vPoBuhIT0+hxuuaO9YQWstC06HnnfAv6O7DO30q65a9hogmn2QN5xcYJz kuWb4VU0Lmdf9HCQ4PUH8JoJOUKB+HkByhPsgTn7omo9nqubPpYDZ22m+REO2D6YnN4u TcQLd08aVVstZCU5UMJunhB7H44751xscuD9tHGYmrihKOJ+/CvbrvuxOosgUqd2teHK kcaw== X-Gm-Message-State: AC+VfDxTVx4hJdgDGhCe75/4b+78OEf6OKr9nMhgdLlF4+E/TItgKSwv 1FoBTmdeoWCFW23CjPl4sMD+OyYmNkevATT636L0ocuvONM7d6Zriyqy/GegLlASg+gB4BQbqB9 ksDtLf2eQJD+pYPcJt58fDu9XUUumaGBniW03iMNWBA== X-Received: by 2002:a17:907:6e0d:b0:974:c32c:b485 with SMTP id sd13-20020a1709076e0d00b00974c32cb485mr5976944ejc.45.1686151295586; Wed, 07 Jun 2023 08:21:35 -0700 (PDT) X-Received: by 2002:a17:907:6e0d:b0:974:c32c:b485 with SMTP id sd13-20020a1709076e0d00b00974c32cb485mr5976932ejc.45.1686151295416; Wed, 07 Jun 2023 08:21:35 -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 w17-20020a056402129100b005147503a238sm6263441edv.17.2023.06.07.08.21.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jun 2023 08:21:35 -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 v3 09/14] ceph: allow idmapped permission inode op Date: Wed, 7 Jun 2023 17:20:33 +0200 Message-Id: <20230607152038.469739-10-aleksandr.mikhalitsyn@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230607152038.469739-1-aleksandr.mikhalitsyn@canonical.com> References: <20230607152038.469739-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=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 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 2e988612ed6c..37e1cbfc7c89 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -2408,7 +2408,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