Message ID | 20230607180958.645115-12-aleksandr.mikhalitsyn@canonical.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp392606vqr; Wed, 7 Jun 2023 11:14:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5UDau6z8R3ICDwdXjrvp16e9weL2e3VPTPQg2umqEqKkcHCGx/Fms5xTdRw02SkDWk3YUY X-Received: by 2002:a17:90a:8417:b0:256:c632:9848 with SMTP id j23-20020a17090a841700b00256c6329848mr5563850pjn.29.1686161671503; Wed, 07 Jun 2023 11:14:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686161671; cv=none; d=google.com; s=arc-20160816; b=Xj1AS06a7CESqbh0haJ/XO2Pc3uahdN8MY0Fh3gKmc7Hzsl/in6/O7Fkk4gVYVnc+U lqMSMqjCvLVuj9yb9S9fjzvu2atZac8h2G8diZ7wLn7s7xnDobcpmoWd4UsdwusCd8E+ pq8BzoacBnUHBrWsi2L/vOsyG+rjFBloTF8UzdUDiizTrkxr2lrBAOaiB57GsNCOhdDJ 2fTb7kKvt63U+G4eJL4LtmVT3Sibrj+2lSmxDVVMpxXEcLjYn9Bia1xxANlTE7tdYHe7 Ysbv4CfiNspyhG4HJqYYiWGVesQUciaX9UQh+cqT3IimIWZfnJxd7Z2kCwbQ4Y05Dma6 uswA== 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=upOvs6cNJRBF+ODdi690KD6aHJ8m7WaiezvTCZyfSFA=; b=IFyewaqBrmHxjunieqXEAMrEqiMvNc+tDx7dbf0PWXo+VtjnHLPSl0M5vx7tuNSDzX ZSy0A+MIHDAeMXlAY+p1PH3qEc0152qYq+pHPbabVOLdyIRPUZFOklqeEEVxqKhz+0IM bGXOuIeS2wL42Y7on5UEw+WApQtYvdG+SbuMABMbNDTZP4c30j/4+Prv0b/bwLQ64yHz h4UdcucjhcTwLnZGZGhRCH0c5DaHrtV5Y72ermLLKEzTfmWI2SDF9NvWi5GZbcv7gmub W5oK/wKnFADW6haVi/aTHbbeVoVOtOLh4ECJZGchoEkld8KxYOFu/nmJhQEcw+2XcVz4 GQWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=EXM9cTb2; 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 z22-20020a17090ad79600b0024e036ec731si1485930pju.36.2023.06.07.11.14.19; Wed, 07 Jun 2023 11:14:31 -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=EXM9cTb2; 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 S232782AbjFGSLm (ORCPT <rfc822;literming00@gmail.com> + 99 others); Wed, 7 Jun 2023 14:11:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232771AbjFGSLI (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 7 Jun 2023 14:11:08 -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 F1BAE2683 for <linux-kernel@vger.kernel.org>; Wed, 7 Jun 2023 11:10:59 -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-1.canonical.com (Postfix) with ESMTPS id 540F73F194 for <linux-kernel@vger.kernel.org>; Wed, 7 Jun 2023 18:10:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1686161458; bh=upOvs6cNJRBF+ODdi690KD6aHJ8m7WaiezvTCZyfSFA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=EXM9cTb2oIFgruKH3+yuFx/cTFCA67lrVeEVlg51dXgwDK0IFYmbB3wmVsojkEed/ jcQhWL5DwwIvwRH+fkpYUWh33npch8VQbxVr6BcEnE1Jj++Koc2Y87PoLdkUsQXFu/ UdGzJMW+CgoiB9NA28uxPk8fKnOiDxkYzkJGiHWXuNfF/XJoDVIQTDA5moME9s76BX 7Tpaox/UF5prRb0s9f8OCEPcGXrKEb96cD9uOPX5vitQ884h0FOQkZiqi7UavNrMlW mATnsOCh+KmUFsj7Ne6rAmXbSSdnGBVBM6+4uMJEd9EhIsgtDiDdkaMQBu+nNB6htg 6sxGiH9mGZW0g== Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-97888a89775so74662066b.0 for <linux-kernel@vger.kernel.org>; Wed, 07 Jun 2023 11:10:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686161458; x=1688753458; 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=upOvs6cNJRBF+ODdi690KD6aHJ8m7WaiezvTCZyfSFA=; b=CBwgkoFEPhXsB9nXdW+DyXgu9DKn4z5Jihja0Qq+5MnmGgvDmFHlqDMWX+bYfc9HkW RJpmHXhKtGyh58FcYXGasAO9weLTlmCjpvJJbzaA6OPDSj7JxcZX2czrqehOrMDKcu3K umCKM2GuVvM3ip7I62uzkkPdmgE78qvEGGOB6s04UxLA9b9LwkaAlBWXA70KRCfDXRIC /3un94daXrgOvVx9SG1hyHKKNx2WBS9vMXOTazQ2EdI8VroJWLlUBw//8UG5n4q4q1r0 YlgcaF28GRHnJStyPGq7BGFW402jgCStifKtl4DZE6LwqxCSbNJFyA1gZGipOOy+Vbz8 n6bQ== X-Gm-Message-State: AC+VfDwZ1nNtpAoHoeI8ZD8Zo4su/Mdn/2idNyFKsndCqkO7768B7bqw G/lwHqnJjFzFgJTHzvctDPgUdVYKHnxcTGprBZW5hSLh7qfvw2gWJ+PSzsRjT29SyvH8armaEhK m57YMQ2lgjBxIZZFaNtSSXzinTOVZ9icBfyI9GdGylw== X-Received: by 2002:a17:907:1687:b0:96f:d345:d104 with SMTP id hc7-20020a170907168700b0096fd345d104mr8799381ejc.38.1686161458013; Wed, 07 Jun 2023 11:10:58 -0700 (PDT) X-Received: by 2002:a17:907:1687:b0:96f:d345:d104 with SMTP id hc7-20020a170907168700b0096fd345d104mr8799368ejc.38.1686161457854; Wed, 07 Jun 2023 11:10:57 -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.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jun 2023 11:10:57 -0700 (PDT) From: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com> To: xiubli@redhat.com Cc: brauner@kernel.org, stgraber@ubuntu.com, linux-fsdevel@vger.kernel.org, Christian Brauner <christian.brauner@ubuntu.com>, Jeff Layton <jlayton@kernel.org>, Ilya Dryomov <idryomov@gmail.com>, ceph-devel@vger.kernel.org, Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>, linux-kernel@vger.kernel.org Subject: [PATCH v4 11/14] ceph: allow idmapped setattr inode op Date: Wed, 7 Jun 2023 20:09:54 +0200 Message-Id: <20230607180958.645115-12-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 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768068660803536840?= X-GMAIL-MSGID: =?utf-8?q?1768068660803536840?= |
Series |
ceph: support idmapped mounts
|
|
Commit Message
Aleksandr Mikhalitsyn
June 7, 2023, 6:09 p.m. UTC
From: Christian Brauner <christian.brauner@ubuntu.com> Enable __ceph_setattr() to handle idmapped mounts. This is just a matter of passing down the mount's idmapping. Cc: Xiubo Li <xiubli@redhat.com> Cc: Jeff Layton <jlayton@kernel.org> Cc: Ilya Dryomov <idryomov@gmail.com> Cc: ceph-devel@vger.kernel.org Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com> [ adapted to b27c82e12965 ("attr: port attribute changes to new types") ] Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com> --- v4: - introduced fsuid/fsgid local variables v3: - reworked as Christian suggested here: https://lore.kernel.org/lkml/20230602-vorzeichen-praktikum-f17931692301@brauner/ --- fs/ceph/inode.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-)
Comments
On 6/8/23 02:09, Alexander Mikhalitsyn wrote: > From: Christian Brauner <christian.brauner@ubuntu.com> > > Enable __ceph_setattr() to handle idmapped mounts. This is just a matter > of passing down the mount's idmapping. > > Cc: Xiubo Li <xiubli@redhat.com> > Cc: Jeff Layton <jlayton@kernel.org> > Cc: Ilya Dryomov <idryomov@gmail.com> > Cc: ceph-devel@vger.kernel.org > Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com> > [ adapted to b27c82e12965 ("attr: port attribute changes to new types") ] > Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com> > --- > v4: > - introduced fsuid/fsgid local variables > v3: > - reworked as Christian suggested here: > https://lore.kernel.org/lkml/20230602-vorzeichen-praktikum-f17931692301@brauner/ > --- > fs/ceph/inode.c | 20 ++++++++++++-------- > 1 file changed, 12 insertions(+), 8 deletions(-) > > diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c > index bcd9b506ec3b..ca438d1353b2 100644 > --- a/fs/ceph/inode.c > +++ b/fs/ceph/inode.c > @@ -2052,31 +2052,35 @@ int __ceph_setattr(struct mnt_idmap *idmap, struct inode *inode, > dout("setattr %p issued %s\n", inode, ceph_cap_string(issued)); > > if (ia_valid & ATTR_UID) { > + kuid_t fsuid = from_vfsuid(idmap, i_user_ns(inode), attr->ia_vfsuid); > + > dout("setattr %p uid %d -> %d\n", inode, > from_kuid(&init_user_ns, inode->i_uid), > from_kuid(&init_user_ns, attr->ia_uid)); > if (issued & CEPH_CAP_AUTH_EXCL) { > - inode->i_uid = attr->ia_uid; > + inode->i_uid = fsuid; > dirtied |= CEPH_CAP_AUTH_EXCL; > } else if ((issued & CEPH_CAP_AUTH_SHARED) == 0 || > - !uid_eq(attr->ia_uid, inode->i_uid)) { > + !uid_eq(fsuid, inode->i_uid)) { > req->r_args.setattr.uid = cpu_to_le32( > - from_kuid(&init_user_ns, attr->ia_uid)); > + from_kuid(&init_user_ns, fsuid)); > mask |= CEPH_SETATTR_UID; > release |= CEPH_CAP_AUTH_SHARED; > } > } > if (ia_valid & ATTR_GID) { > + kgid_t fsgid = from_vfsgid(idmap, i_user_ns(inode), attr->ia_vfsgid); > + > dout("setattr %p gid %d -> %d\n", inode, > from_kgid(&init_user_ns, inode->i_gid), > from_kgid(&init_user_ns, attr->ia_gid)); > if (issued & CEPH_CAP_AUTH_EXCL) { > - inode->i_gid = attr->ia_gid; > + inode->i_gid = fsgid; > dirtied |= CEPH_CAP_AUTH_EXCL; > } else if ((issued & CEPH_CAP_AUTH_SHARED) == 0 || > - !gid_eq(attr->ia_gid, inode->i_gid)) { > + !gid_eq(fsgid, inode->i_gid)) { > req->r_args.setattr.gid = cpu_to_le32( > - from_kgid(&init_user_ns, attr->ia_gid)); > + from_kgid(&init_user_ns, fsgid)); > mask |= CEPH_SETATTR_GID; > release |= CEPH_CAP_AUTH_SHARED; > } > @@ -2241,7 +2245,7 @@ int ceph_setattr(struct mnt_idmap *idmap, struct dentry *dentry, > if (ceph_inode_is_shutdown(inode)) > return -ESTALE; > > - err = setattr_prepare(&nop_mnt_idmap, dentry, attr); > + err = setattr_prepare(idmap, dentry, attr); > if (err != 0) > return err; > > @@ -2256,7 +2260,7 @@ int ceph_setattr(struct mnt_idmap *idmap, struct dentry *dentry, > err = __ceph_setattr(idmap, inode, attr); > > if (err >= 0 && (attr->ia_valid & ATTR_MODE)) > - err = posix_acl_chmod(&nop_mnt_idmap, dentry, attr->ia_mode); > + err = posix_acl_chmod(idmap, dentry, attr->ia_mode); > > return err; > } You should also do 'req->r_mnt_idmap = idmap;' for sync setattr request. the setattr will just cache the change locally in client side if the 'x' caps are issued and returns directly or will set a sync setattr reqeust. Thanks - Xiubo
On Thu, Jun 8, 2023 at 4:50 AM Xiubo Li <xiubli@redhat.com> wrote: > > > On 6/8/23 02:09, Alexander Mikhalitsyn wrote: > > From: Christian Brauner <christian.brauner@ubuntu.com> > > > > Enable __ceph_setattr() to handle idmapped mounts. This is just a matter > > of passing down the mount's idmapping. > > > > Cc: Xiubo Li <xiubli@redhat.com> > > Cc: Jeff Layton <jlayton@kernel.org> > > Cc: Ilya Dryomov <idryomov@gmail.com> > > Cc: ceph-devel@vger.kernel.org > > Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com> > > [ adapted to b27c82e12965 ("attr: port attribute changes to new types") ] > > Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com> > > --- > > v4: > > - introduced fsuid/fsgid local variables > > v3: > > - reworked as Christian suggested here: > > https://lore.kernel.org/lkml/20230602-vorzeichen-praktikum-f17931692301@brauner/ > > --- > > fs/ceph/inode.c | 20 ++++++++++++-------- > > 1 file changed, 12 insertions(+), 8 deletions(-) > > > > diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c > > index bcd9b506ec3b..ca438d1353b2 100644 > > --- a/fs/ceph/inode.c > > +++ b/fs/ceph/inode.c > > @@ -2052,31 +2052,35 @@ int __ceph_setattr(struct mnt_idmap *idmap, struct inode *inode, > > dout("setattr %p issued %s\n", inode, ceph_cap_string(issued)); > > > > if (ia_valid & ATTR_UID) { > > + kuid_t fsuid = from_vfsuid(idmap, i_user_ns(inode), attr->ia_vfsuid); > > + > > dout("setattr %p uid %d -> %d\n", inode, > > from_kuid(&init_user_ns, inode->i_uid), > > from_kuid(&init_user_ns, attr->ia_uid)); > > if (issued & CEPH_CAP_AUTH_EXCL) { > > - inode->i_uid = attr->ia_uid; > > + inode->i_uid = fsuid; > > dirtied |= CEPH_CAP_AUTH_EXCL; > > } else if ((issued & CEPH_CAP_AUTH_SHARED) == 0 || > > - !uid_eq(attr->ia_uid, inode->i_uid)) { > > + !uid_eq(fsuid, inode->i_uid)) { > > req->r_args.setattr.uid = cpu_to_le32( > > - from_kuid(&init_user_ns, attr->ia_uid)); > > + from_kuid(&init_user_ns, fsuid)); > > mask |= CEPH_SETATTR_UID; > > release |= CEPH_CAP_AUTH_SHARED; > > } > > } > > if (ia_valid & ATTR_GID) { > > + kgid_t fsgid = from_vfsgid(idmap, i_user_ns(inode), attr->ia_vfsgid); > > + > > dout("setattr %p gid %d -> %d\n", inode, > > from_kgid(&init_user_ns, inode->i_gid), > > from_kgid(&init_user_ns, attr->ia_gid)); > > if (issued & CEPH_CAP_AUTH_EXCL) { > > - inode->i_gid = attr->ia_gid; > > + inode->i_gid = fsgid; > > dirtied |= CEPH_CAP_AUTH_EXCL; > > } else if ((issued & CEPH_CAP_AUTH_SHARED) == 0 || > > - !gid_eq(attr->ia_gid, inode->i_gid)) { > > + !gid_eq(fsgid, inode->i_gid)) { > > req->r_args.setattr.gid = cpu_to_le32( > > - from_kgid(&init_user_ns, attr->ia_gid)); > > + from_kgid(&init_user_ns, fsgid)); > > mask |= CEPH_SETATTR_GID; > > release |= CEPH_CAP_AUTH_SHARED; > > } > > @@ -2241,7 +2245,7 @@ int ceph_setattr(struct mnt_idmap *idmap, struct dentry *dentry, > > if (ceph_inode_is_shutdown(inode)) > > return -ESTALE; > > > > - err = setattr_prepare(&nop_mnt_idmap, dentry, attr); > > + err = setattr_prepare(idmap, dentry, attr); > > if (err != 0) > > return err; > > > > @@ -2256,7 +2260,7 @@ int ceph_setattr(struct mnt_idmap *idmap, struct dentry *dentry, > > err = __ceph_setattr(idmap, inode, attr); > > > > if (err >= 0 && (attr->ia_valid & ATTR_MODE)) > > - err = posix_acl_chmod(&nop_mnt_idmap, dentry, attr->ia_mode); > > + err = posix_acl_chmod(idmap, dentry, attr->ia_mode); > > > > return err; > > } Hi Xiubo, > > You should also do 'req->r_mnt_idmap = idmap;' for sync setattr request. > > the setattr will just cache the change locally in client side if the 'x' > caps are issued and returns directly or will set a sync setattr reqeust. Have done in v5: ("ceph: pass idmap to __ceph_setattr") https://lore.kernel.org/lkml/20230608154256.562906-8-aleksandr.mikhalitsyn@canonical.com/ Kind regards, Alex > > Thanks > > - Xiubo >
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index bcd9b506ec3b..ca438d1353b2 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -2052,31 +2052,35 @@ int __ceph_setattr(struct mnt_idmap *idmap, struct inode *inode, dout("setattr %p issued %s\n", inode, ceph_cap_string(issued)); if (ia_valid & ATTR_UID) { + kuid_t fsuid = from_vfsuid(idmap, i_user_ns(inode), attr->ia_vfsuid); + dout("setattr %p uid %d -> %d\n", inode, from_kuid(&init_user_ns, inode->i_uid), from_kuid(&init_user_ns, attr->ia_uid)); if (issued & CEPH_CAP_AUTH_EXCL) { - inode->i_uid = attr->ia_uid; + inode->i_uid = fsuid; dirtied |= CEPH_CAP_AUTH_EXCL; } else if ((issued & CEPH_CAP_AUTH_SHARED) == 0 || - !uid_eq(attr->ia_uid, inode->i_uid)) { + !uid_eq(fsuid, inode->i_uid)) { req->r_args.setattr.uid = cpu_to_le32( - from_kuid(&init_user_ns, attr->ia_uid)); + from_kuid(&init_user_ns, fsuid)); mask |= CEPH_SETATTR_UID; release |= CEPH_CAP_AUTH_SHARED; } } if (ia_valid & ATTR_GID) { + kgid_t fsgid = from_vfsgid(idmap, i_user_ns(inode), attr->ia_vfsgid); + dout("setattr %p gid %d -> %d\n", inode, from_kgid(&init_user_ns, inode->i_gid), from_kgid(&init_user_ns, attr->ia_gid)); if (issued & CEPH_CAP_AUTH_EXCL) { - inode->i_gid = attr->ia_gid; + inode->i_gid = fsgid; dirtied |= CEPH_CAP_AUTH_EXCL; } else if ((issued & CEPH_CAP_AUTH_SHARED) == 0 || - !gid_eq(attr->ia_gid, inode->i_gid)) { + !gid_eq(fsgid, inode->i_gid)) { req->r_args.setattr.gid = cpu_to_le32( - from_kgid(&init_user_ns, attr->ia_gid)); + from_kgid(&init_user_ns, fsgid)); mask |= CEPH_SETATTR_GID; release |= CEPH_CAP_AUTH_SHARED; } @@ -2241,7 +2245,7 @@ int ceph_setattr(struct mnt_idmap *idmap, struct dentry *dentry, if (ceph_inode_is_shutdown(inode)) return -ESTALE; - err = setattr_prepare(&nop_mnt_idmap, dentry, attr); + err = setattr_prepare(idmap, dentry, attr); if (err != 0) return err; @@ -2256,7 +2260,7 @@ int ceph_setattr(struct mnt_idmap *idmap, struct dentry *dentry, err = __ceph_setattr(idmap, inode, attr); if (err >= 0 && (attr->ia_valid & ATTR_MODE)) - err = posix_acl_chmod(&nop_mnt_idmap, dentry, attr->ia_mode); + err = posix_acl_chmod(idmap, dentry, attr->ia_mode); return err; }