aboutsummaryrefslogtreecommitdiff
path: root/fs/fuse/file.c
diff options
context:
space:
mode:
authorAlexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>2024-09-03 17:16:14 +0200
committerMiklos Szeredi <mszeredi@redhat.com>2024-09-04 16:48:22 +0200
commit10dc721836c0c968990a519e147d4cb7decdae5c (patch)
tree3825f7684a3ef585bdc9f8bb245f5b1aa7ebeaac /fs/fuse/file.c
parentaa16880d9f13c6490e80ad614402c8a6fe6f3efa (diff)
fuse: add an idmap argument to fuse_simple_request
If idmap == NULL *and* filesystem daemon declared idmapped mounts support, then uid/gid values in a fuse header will be -1. No functional changes intended. Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/fuse/file.c')
-rw-r--r--fs/fuse/file.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index fc587f3bc56f..3c18e90fff07 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -48,7 +48,7 @@ static int fuse_send_open(struct fuse_mount *fm, u64 nodeid,
args.out_args[0].size = sizeof(*outargp);
args.out_args[0].value = outargp;
- return fuse_simple_request(fm, &args);
+ return fuse_simple_request(NULL, fm, &args);
}
struct fuse_file *fuse_file_alloc(struct fuse_mount *fm, bool release)
@@ -111,7 +111,7 @@ static void fuse_file_put(struct fuse_file *ff, bool sync)
if (!args) {
/* Do nothing when server does not implement 'open' */
} else if (sync) {
- fuse_simple_request(ff->fm, args);
+ fuse_simple_request(NULL, ff->fm, args);
fuse_release_end(ff->fm, args, 0);
} else {
args->end = fuse_release_end;
@@ -539,7 +539,7 @@ static int fuse_flush(struct file *file, fl_owner_t id)
args.in_args[0].value = &inarg;
args.force = true;
- err = fuse_simple_request(fm, &args);
+ err = fuse_simple_request(NULL, fm, &args);
if (err == -ENOSYS) {
fm->fc->no_flush = 1;
err = 0;
@@ -572,7 +572,7 @@ int fuse_fsync_common(struct file *file, loff_t start, loff_t end,
args.in_numargs = 1;
args.in_args[0].size = sizeof(inarg);
args.in_args[0].value = &inarg;
- return fuse_simple_request(fm, &args);
+ return fuse_simple_request(NULL, fm, &args);
}
static int fuse_fsync(struct file *file, loff_t start, loff_t end,
@@ -814,7 +814,7 @@ static ssize_t fuse_send_read(struct fuse_io_args *ia, loff_t pos, size_t count,
if (ia->io->async)
return fuse_async_req_send(fm, ia, count);
- return fuse_simple_request(fm, &ia->ap.args);
+ return fuse_simple_request(NULL, fm, &ia->ap.args);
}
static void fuse_read_update_size(struct inode *inode, loff_t size,
@@ -878,7 +878,7 @@ static int fuse_do_readpage(struct file *file, struct page *page)
desc.length--;
fuse_read_args_fill(&ia, file, pos, desc.length, FUSE_READ);
- res = fuse_simple_request(fm, &ia.ap.args);
+ res = fuse_simple_request(NULL, fm, &ia.ap.args);
if (res < 0)
return res;
/*
@@ -976,7 +976,7 @@ static void fuse_send_readpages(struct fuse_io_args *ia, struct file *file)
if (!err)
return;
} else {
- res = fuse_simple_request(fm, &ap->args);
+ res = fuse_simple_request(NULL, fm, &ap->args);
err = res < 0 ? res : 0;
}
fuse_readpages_end(fm, &ap->args, err);
@@ -1101,7 +1101,7 @@ static ssize_t fuse_send_write(struct fuse_io_args *ia, loff_t pos,
if (ia->io->async)
return fuse_async_req_send(fm, ia, count);
- err = fuse_simple_request(fm, &ia->ap.args);
+ err = fuse_simple_request(NULL, fm, &ia->ap.args);
if (!err && ia->write.out.size > count)
err = -EIO;
@@ -1147,7 +1147,7 @@ static ssize_t fuse_send_write_pages(struct fuse_io_args *ia,
if (fm->fc->handle_killpriv_v2 && !capable(CAP_FSETID))
ia->write.in.write_flags |= FUSE_WRITE_KILL_SUIDGID;
- err = fuse_simple_request(fm, &ap->args);
+ err = fuse_simple_request(NULL, fm, &ap->args);
if (!err && ia->write.out.size > count)
err = -EIO;
@@ -2661,7 +2661,7 @@ static int fuse_getlk(struct file *file, struct file_lock *fl)
args.out_numargs = 1;
args.out_args[0].size = sizeof(outarg);
args.out_args[0].value = &outarg;
- err = fuse_simple_request(fm, &args);
+ err = fuse_simple_request(NULL, fm, &args);
if (!err)
err = convert_fuse_file_lock(fm->fc, &outarg.lk, fl);
@@ -2685,7 +2685,7 @@ static int fuse_setlk(struct file *file, struct file_lock *fl, int flock)
}
fuse_lk_fill(&args, file, fl, opcode, pid_nr, flock, &inarg);
- err = fuse_simple_request(fm, &args);
+ err = fuse_simple_request(NULL, fm, &args);
/* locking is restartable */
if (err == -EINTR)
@@ -2759,7 +2759,7 @@ static sector_t fuse_bmap(struct address_space *mapping, sector_t block)
args.out_numargs = 1;
args.out_args[0].size = sizeof(outarg);
args.out_args[0].value = &outarg;
- err = fuse_simple_request(fm, &args);
+ err = fuse_simple_request(NULL, fm, &args);
if (err == -ENOSYS)
fm->fc->no_bmap = 1;
@@ -2791,7 +2791,7 @@ static loff_t fuse_lseek(struct file *file, loff_t offset, int whence)
args.out_numargs = 1;
args.out_args[0].size = sizeof(outarg);
args.out_args[0].value = &outarg;
- err = fuse_simple_request(fm, &args);
+ err = fuse_simple_request(NULL, fm, &args);
if (err) {
if (err == -ENOSYS) {
fm->fc->no_lseek = 1;
@@ -2924,7 +2924,7 @@ __poll_t fuse_file_poll(struct file *file, poll_table *wait)
args.out_numargs = 1;
args.out_args[0].size = sizeof(outarg);
args.out_args[0].value = &outarg;
- err = fuse_simple_request(fm, &args);
+ err = fuse_simple_request(NULL, fm, &args);
if (!err)
return demangle_poll(outarg.revents);
@@ -3146,7 +3146,7 @@ static long fuse_file_fallocate(struct file *file, int mode, loff_t offset,
args.in_numargs = 1;
args.in_args[0].size = sizeof(inarg);
args.in_args[0].value = &inarg;
- err = fuse_simple_request(fm, &args);
+ err = fuse_simple_request(NULL, fm, &args);
if (err == -ENOSYS) {
fm->fc->no_fallocate = 1;
err = -EOPNOTSUPP;
@@ -3258,7 +3258,7 @@ static ssize_t __fuse_copy_file_range(struct file *file_in, loff_t pos_in,
args.out_numargs = 1;
args.out_args[0].size = sizeof(outarg);
args.out_args[0].value = &outarg;
- err = fuse_simple_request(fm, &args);
+ err = fuse_simple_request(NULL, fm, &args);
if (err == -ENOSYS) {
fc->no_copy_file_range = 1;
err = -EOPNOTSUPP;