diff options
author | Christian Brauner <brauner@kernel.org> | 2022-10-28 09:56:20 +0200 |
---|---|---|
committer | Christian Brauner (Microsoft) <brauner@kernel.org> | 2022-10-31 17:48:12 +0100 |
commit | 5a6f52d20ce3cd6d30103a27f18edff337da191b (patch) | |
tree | f0f496a4dad3a008444a5c62b170aea996685709 /io_uring/xattr.c | |
parent | 256c8aed2b420a7c57ed6469fbb0f8310f5aeec9 (diff) | |
download | linux-rpi-5a6f52d20ce3cd6d30103a27f18edff337da191b.tar.gz linux-rpi-5a6f52d20ce3cd6d30103a27f18edff337da191b.tar.bz2 linux-rpi-5a6f52d20ce3cd6d30103a27f18edff337da191b.zip |
acl: conver higher-level helpers to rely on mnt_idmap
Convert an initial portion to rely on struct mnt_idmap by converting the
high level xattr helpers.
Reviewed-by: Seth Forshee (DigitalOcean) <sforshee@kernel.org>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Diffstat (limited to 'io_uring/xattr.c')
-rw-r--r-- | io_uring/xattr.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/io_uring/xattr.c b/io_uring/xattr.c index 99df641594d7..6201a9f442c6 100644 --- a/io_uring/xattr.c +++ b/io_uring/xattr.c @@ -112,7 +112,7 @@ int io_fgetxattr(struct io_kiocb *req, unsigned int issue_flags) if (issue_flags & IO_URING_F_NONBLOCK) return -EAGAIN; - ret = do_getxattr(mnt_user_ns(req->file->f_path.mnt), + ret = do_getxattr(mnt_idmap(req->file->f_path.mnt), req->file->f_path.dentry, &ix->ctx); @@ -133,9 +133,7 @@ int io_getxattr(struct io_kiocb *req, unsigned int issue_flags) retry: ret = filename_lookup(AT_FDCWD, ix->filename, lookup_flags, &path, NULL); if (!ret) { - ret = do_getxattr(mnt_user_ns(path.mnt), - path.dentry, - &ix->ctx); + ret = do_getxattr(mnt_idmap(path.mnt), path.dentry, &ix->ctx); path_put(&path); if (retry_estale(ret, lookup_flags)) { @@ -213,7 +211,7 @@ static int __io_setxattr(struct io_kiocb *req, unsigned int issue_flags, ret = mnt_want_write(path->mnt); if (!ret) { - ret = do_setxattr(mnt_user_ns(path->mnt), path->dentry, &ix->ctx); + ret = do_setxattr(mnt_idmap(path->mnt), path->dentry, &ix->ctx); mnt_drop_write(path->mnt); } |