Commit ceb452e1 authored by Jens Axboe's avatar Jens Axboe

io_uring: convert xattr to use io_cmd_type

Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent ea5af87d
...@@ -979,7 +979,6 @@ struct io_kiocb { ...@@ -979,7 +979,6 @@ struct io_kiocb {
*/ */
struct file *file; struct file *file;
struct io_cmd_data cmd; struct io_cmd_data cmd;
struct io_xattr xattr;
struct io_uring_cmd uring_cmd; struct io_uring_cmd uring_cmd;
}; };
...@@ -4402,7 +4401,7 @@ static int io_renameat(struct io_kiocb *req, unsigned int issue_flags) ...@@ -4402,7 +4401,7 @@ static int io_renameat(struct io_kiocb *req, unsigned int issue_flags)
static inline void __io_xattr_finish(struct io_kiocb *req) static inline void __io_xattr_finish(struct io_kiocb *req)
{ {
struct io_xattr *ix = &req->xattr; struct io_xattr *ix = io_kiocb_to_cmd(req);
if (ix->filename) if (ix->filename)
putname(ix->filename); putname(ix->filename);
...@@ -4422,7 +4421,7 @@ static void io_xattr_finish(struct io_kiocb *req, int ret) ...@@ -4422,7 +4421,7 @@ static void io_xattr_finish(struct io_kiocb *req, int ret)
static int __io_getxattr_prep(struct io_kiocb *req, static int __io_getxattr_prep(struct io_kiocb *req,
const struct io_uring_sqe *sqe) const struct io_uring_sqe *sqe)
{ {
struct io_xattr *ix = &req->xattr; struct io_xattr *ix = io_kiocb_to_cmd(req);
const char __user *name; const char __user *name;
int ret; int ret;
...@@ -4465,7 +4464,7 @@ static int io_fgetxattr_prep(struct io_kiocb *req, ...@@ -4465,7 +4464,7 @@ static int io_fgetxattr_prep(struct io_kiocb *req,
static int io_getxattr_prep(struct io_kiocb *req, static int io_getxattr_prep(struct io_kiocb *req,
const struct io_uring_sqe *sqe) const struct io_uring_sqe *sqe)
{ {
struct io_xattr *ix = &req->xattr; struct io_xattr *ix = io_kiocb_to_cmd(req);
const char __user *path; const char __user *path;
int ret; int ret;
...@@ -4486,7 +4485,7 @@ static int io_getxattr_prep(struct io_kiocb *req, ...@@ -4486,7 +4485,7 @@ static int io_getxattr_prep(struct io_kiocb *req,
static int io_fgetxattr(struct io_kiocb *req, unsigned int issue_flags) static int io_fgetxattr(struct io_kiocb *req, unsigned int issue_flags)
{ {
struct io_xattr *ix = &req->xattr; struct io_xattr *ix = io_kiocb_to_cmd(req);
int ret; int ret;
if (issue_flags & IO_URING_F_NONBLOCK) if (issue_flags & IO_URING_F_NONBLOCK)
...@@ -4502,7 +4501,7 @@ static int io_fgetxattr(struct io_kiocb *req, unsigned int issue_flags) ...@@ -4502,7 +4501,7 @@ static int io_fgetxattr(struct io_kiocb *req, unsigned int issue_flags)
static int io_getxattr(struct io_kiocb *req, unsigned int issue_flags) static int io_getxattr(struct io_kiocb *req, unsigned int issue_flags)
{ {
struct io_xattr *ix = &req->xattr; struct io_xattr *ix = io_kiocb_to_cmd(req);
unsigned int lookup_flags = LOOKUP_FOLLOW; unsigned int lookup_flags = LOOKUP_FOLLOW;
struct path path; struct path path;
int ret; int ret;
...@@ -4531,7 +4530,7 @@ static int io_getxattr(struct io_kiocb *req, unsigned int issue_flags) ...@@ -4531,7 +4530,7 @@ static int io_getxattr(struct io_kiocb *req, unsigned int issue_flags)
static int __io_setxattr_prep(struct io_kiocb *req, static int __io_setxattr_prep(struct io_kiocb *req,
const struct io_uring_sqe *sqe) const struct io_uring_sqe *sqe)
{ {
struct io_xattr *ix = &req->xattr; struct io_xattr *ix = io_kiocb_to_cmd(req);
const char __user *name; const char __user *name;
int ret; int ret;
...@@ -4562,7 +4561,7 @@ static int __io_setxattr_prep(struct io_kiocb *req, ...@@ -4562,7 +4561,7 @@ static int __io_setxattr_prep(struct io_kiocb *req,
static int io_setxattr_prep(struct io_kiocb *req, static int io_setxattr_prep(struct io_kiocb *req,
const struct io_uring_sqe *sqe) const struct io_uring_sqe *sqe)
{ {
struct io_xattr *ix = &req->xattr; struct io_xattr *ix = io_kiocb_to_cmd(req);
const char __user *path; const char __user *path;
int ret; int ret;
...@@ -4590,7 +4589,7 @@ static int io_fsetxattr_prep(struct io_kiocb *req, ...@@ -4590,7 +4589,7 @@ static int io_fsetxattr_prep(struct io_kiocb *req,
static int __io_setxattr(struct io_kiocb *req, unsigned int issue_flags, static int __io_setxattr(struct io_kiocb *req, unsigned int issue_flags,
struct path *path) struct path *path)
{ {
struct io_xattr *ix = &req->xattr; struct io_xattr *ix = io_kiocb_to_cmd(req);
int ret; int ret;
ret = mnt_want_write(path->mnt); ret = mnt_want_write(path->mnt);
...@@ -4617,7 +4616,7 @@ static int io_fsetxattr(struct io_kiocb *req, unsigned int issue_flags) ...@@ -4617,7 +4616,7 @@ static int io_fsetxattr(struct io_kiocb *req, unsigned int issue_flags)
static int io_setxattr(struct io_kiocb *req, unsigned int issue_flags) static int io_setxattr(struct io_kiocb *req, unsigned int issue_flags)
{ {
struct io_xattr *ix = &req->xattr; struct io_xattr *ix = io_kiocb_to_cmd(req);
unsigned int lookup_flags = LOOKUP_FOLLOW; unsigned int lookup_flags = LOOKUP_FOLLOW;
struct path path; struct path path;
int ret; int ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment