aboutsummaryrefslogtreecommitdiff
path: root/fs/fuse/dir.c
diff options
context:
space:
mode:
authorAlexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>2024-09-06 16:34:51 +0200
committerMiklos Szeredi <mszeredi@redhat.com>2024-09-23 11:07:55 +0200
commit0c6793823d2b0eb079f4c6f54d9cdf6b2beec9d8 (patch)
tree3160ea9c32673ca762b86a034eeecc48b0a495eb /fs/fuse/dir.c
parent3988a60d3aaabd6cca64fbd8f7be65c0c878d87b (diff)
fs/fuse: introduce and use fuse_simple_idmap_request() helper
Let's convert all existing callers properly. No functional changes intended. Suggested-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com> Reviewed-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/fuse/dir.c')
-rw-r--r--fs/fuse/dir.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index 99f9948bf68b..491e112819be 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -230,7 +230,7 @@ static int fuse_dentry_revalidate(struct dentry *entry, unsigned int flags)
parent = dget_parent(entry);
fuse_lookup_init(fm->fc, &args, get_node_id(d_inode(parent)),
&entry->d_name, &outarg);
- ret = fuse_simple_request(NULL, fm, &args);
+ ret = fuse_simple_request(fm, &args);
dput(parent);
/* Zero nodeid is same as -ENOENT */
if (!ret && !outarg.nodeid)
@@ -383,7 +383,7 @@ int fuse_lookup_name(struct super_block *sb, u64 nodeid, const struct qstr *name
attr_version = fuse_get_attr_version(fm->fc);
fuse_lookup_init(fm->fc, &args, nodeid, name, outarg);
- err = fuse_simple_request(NULL, fm, &args);
+ err = fuse_simple_request(fm, &args);
/* Zero nodeid is same as -ENOENT, but with valid timeout */
if (err || !outarg->nodeid)
goto out_put_forget;
@@ -677,7 +677,7 @@ static int fuse_create_open(struct mnt_idmap *idmap, struct inode *dir,
if (err)
goto out_free_ff;
- err = fuse_simple_request(idmap, fm, &args);
+ err = fuse_simple_idmap_request(idmap, fm, &args);
free_ext_value(&args);
if (err)
goto out_free_ff;
@@ -809,7 +809,7 @@ static int create_new_entry(struct mnt_idmap *idmap, struct fuse_mount *fm,
goto out_put_forget_req;
}
- err = fuse_simple_request(idmap, fm, args);
+ err = fuse_simple_idmap_request(idmap, fm, args);
free_ext_value(args);
if (err)
goto out_put_forget_req;
@@ -994,7 +994,7 @@ static int fuse_unlink(struct inode *dir, struct dentry *entry)
args.in_numargs = 1;
args.in_args[0].size = entry->d_name.len + 1;
args.in_args[0].value = entry->d_name.name;
- err = fuse_simple_request(NULL, fm, &args);
+ err = fuse_simple_request(fm, &args);
if (!err) {
fuse_dir_changed(dir);
fuse_entry_unlinked(entry);
@@ -1017,7 +1017,7 @@ static int fuse_rmdir(struct inode *dir, struct dentry *entry)
args.in_numargs = 1;
args.in_args[0].size = entry->d_name.len + 1;
args.in_args[0].value = entry->d_name.name;
- err = fuse_simple_request(NULL, fm, &args);
+ err = fuse_simple_request(fm, &args);
if (!err) {
fuse_dir_changed(dir);
fuse_entry_unlinked(entry);
@@ -1047,7 +1047,7 @@ static int fuse_rename_common(struct mnt_idmap *idmap, struct inode *olddir, str
args.in_args[1].value = oldent->d_name.name;
args.in_args[2].size = newent->d_name.len + 1;
args.in_args[2].value = newent->d_name.name;
- err = fuse_simple_request(idmap, fm, &args);
+ err = fuse_simple_idmap_request(idmap, fm, &args);
if (!err) {
/* ctime changes */
fuse_update_ctime(d_inode(oldent));
@@ -1222,7 +1222,7 @@ static int fuse_do_statx(struct mnt_idmap *idmap, struct inode *inode,
args.out_numargs = 1;
args.out_args[0].size = sizeof(outarg);
args.out_args[0].value = &outarg;
- err = fuse_simple_request(NULL, fm, &args);
+ err = fuse_simple_request(fm, &args);
if (err)
return err;
@@ -1280,7 +1280,7 @@ static int fuse_do_getattr(struct mnt_idmap *idmap, struct inode *inode,
args.out_numargs = 1;
args.out_args[0].size = sizeof(outarg);
args.out_args[0].value = &outarg;
- err = fuse_simple_request(NULL, fm, &args);
+ err = fuse_simple_request(fm, &args);
if (!err) {
if (fuse_invalid_attr(&outarg.attr) ||
inode_wrong_type(inode, outarg.attr.mode)) {
@@ -1492,7 +1492,7 @@ static int fuse_access(struct inode *inode, int mask)
args.in_numargs = 1;
args.in_args[0].size = sizeof(inarg);
args.in_args[0].value = &inarg;
- err = fuse_simple_request(NULL, fm, &args);
+ err = fuse_simple_request(fm, &args);
if (err == -ENOSYS) {
fm->fc->no_access = 1;
err = 0;
@@ -1604,7 +1604,7 @@ static int fuse_readlink_page(struct inode *inode, struct page *page)
ap.args.page_zeroing = true;
ap.args.out_numargs = 1;
ap.args.out_args[0].size = desc.length;
- res = fuse_simple_request(NULL, fm, &ap.args);
+ res = fuse_simple_request(fm, &ap.args);
fuse_invalidate_atime(inode);
@@ -1889,7 +1889,7 @@ int fuse_flush_times(struct inode *inode, struct fuse_file *ff)
}
fuse_setattr_fill(fm->fc, &args, inode, &inarg, &outarg);
- return fuse_simple_request(NULL, fm, &args);
+ return fuse_simple_request(fm, &args);
}
/*
@@ -2002,7 +2002,7 @@ int fuse_do_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
inarg.valid |= FATTR_KILL_SUIDGID;
}
fuse_setattr_fill(fc, &args, inode, &inarg, &outarg);
- err = fuse_simple_request(NULL, fm, &args);
+ err = fuse_simple_request(fm, &args);
if (err) {
if (err == -EINTR)
fuse_invalidate_attr(inode);