mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-07 22:03:14 +00:00
ceph: pass idmap to __ceph_setattr
Just pass down the mount's idmapping to __ceph_setattr, because we will need it later. Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com> Acked-by: Christian Brauner <brauner@kernel.org> Reviewed-by: Xiubo Li <xiubli@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
parent
8995375fae
commit
79c66a0c8c
@ -142,7 +142,7 @@ int ceph_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
|
|||||||
newattrs.ia_ctime = current_time(inode);
|
newattrs.ia_ctime = current_time(inode);
|
||||||
newattrs.ia_mode = new_mode;
|
newattrs.ia_mode = new_mode;
|
||||||
newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
|
newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
|
||||||
ret = __ceph_setattr(inode, &newattrs, NULL);
|
ret = __ceph_setattr(idmap, inode, &newattrs, NULL);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out_free;
|
goto out_free;
|
||||||
}
|
}
|
||||||
@ -153,7 +153,7 @@ int ceph_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
|
|||||||
newattrs.ia_ctime = old_ctime;
|
newattrs.ia_ctime = old_ctime;
|
||||||
newattrs.ia_mode = old_mode;
|
newattrs.ia_mode = old_mode;
|
||||||
newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
|
newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
|
||||||
__ceph_setattr(inode, &newattrs, NULL);
|
__ceph_setattr(idmap, inode, &newattrs, NULL);
|
||||||
}
|
}
|
||||||
goto out_free;
|
goto out_free;
|
||||||
}
|
}
|
||||||
|
@ -113,7 +113,7 @@ static int ceph_crypt_set_context(struct inode *inode, const void *ctx,
|
|||||||
|
|
||||||
cia.fscrypt_auth = cfa;
|
cia.fscrypt_auth = cfa;
|
||||||
|
|
||||||
ret = __ceph_setattr(inode, &attr, &cia);
|
ret = __ceph_setattr(&nop_mnt_idmap, inode, &attr, &cia);
|
||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
inode_set_flags(inode, S_ENCRYPTED, S_ENCRYPTED);
|
inode_set_flags(inode, S_ENCRYPTED, S_ENCRYPTED);
|
||||||
kfree(cia.fscrypt_auth);
|
kfree(cia.fscrypt_auth);
|
||||||
|
@ -2457,8 +2457,8 @@ static int fill_fscrypt_truncate(struct inode *inode,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int __ceph_setattr(struct inode *inode, struct iattr *attr,
|
int __ceph_setattr(struct mnt_idmap *idmap, struct inode *inode,
|
||||||
struct ceph_iattr *cia)
|
struct iattr *attr, struct ceph_iattr *cia)
|
||||||
{
|
{
|
||||||
struct ceph_inode_info *ci = ceph_inode(inode);
|
struct ceph_inode_info *ci = ceph_inode(inode);
|
||||||
unsigned int ia_valid = attr->ia_valid;
|
unsigned int ia_valid = attr->ia_valid;
|
||||||
@ -2811,7 +2811,7 @@ int ceph_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
|
|||||||
ceph_quota_is_max_bytes_exceeded(inode, attr->ia_size))
|
ceph_quota_is_max_bytes_exceeded(inode, attr->ia_size))
|
||||||
return -EDQUOT;
|
return -EDQUOT;
|
||||||
|
|
||||||
err = __ceph_setattr(inode, attr, NULL);
|
err = __ceph_setattr(idmap, inode, attr, NULL);
|
||||||
|
|
||||||
if (err >= 0 && (attr->ia_valid & ATTR_MODE))
|
if (err >= 0 && (attr->ia_valid & ATTR_MODE))
|
||||||
err = posix_acl_chmod(&nop_mnt_idmap, dentry, attr->ia_mode);
|
err = posix_acl_chmod(&nop_mnt_idmap, dentry, attr->ia_mode);
|
||||||
|
@ -1100,8 +1100,8 @@ struct ceph_iattr {
|
|||||||
struct ceph_fscrypt_auth *fscrypt_auth;
|
struct ceph_fscrypt_auth *fscrypt_auth;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern int __ceph_setattr(struct inode *inode, struct iattr *attr,
|
extern int __ceph_setattr(struct mnt_idmap *idmap, struct inode *inode,
|
||||||
struct ceph_iattr *cia);
|
struct iattr *attr, struct ceph_iattr *cia);
|
||||||
extern int ceph_setattr(struct mnt_idmap *idmap,
|
extern int ceph_setattr(struct mnt_idmap *idmap,
|
||||||
struct dentry *dentry, struct iattr *attr);
|
struct dentry *dentry, struct iattr *attr);
|
||||||
extern int ceph_getattr(struct mnt_idmap *idmap,
|
extern int ceph_getattr(struct mnt_idmap *idmap,
|
||||||
|
Loading…
Reference in New Issue
Block a user