fuse: remove unused arg in fuse_write_file_get()
authorMiklos Szeredi <mszeredi@redhat.com>
Wed, 1 Sep 2021 10:39:02 +0000 (12:39 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Mon, 6 Sep 2021 11:37:10 +0000 (13:37 +0200)
The struct fuse_conn argument is not used and can be removed.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/file.c

index 2bca7ed..f196680 100644 (file)
@@ -1820,8 +1820,7 @@ static void fuse_writepage_end(struct fuse_mount *fm, struct fuse_args *args,
        fuse_writepage_free(wpa);
 }
 
        fuse_writepage_free(wpa);
 }
 
-static struct fuse_file *__fuse_write_file_get(struct fuse_conn *fc,
-                                              struct fuse_inode *fi)
+static struct fuse_file *__fuse_write_file_get(struct fuse_inode *fi)
 {
        struct fuse_file *ff = NULL;
 
 {
        struct fuse_file *ff = NULL;
 
@@ -1836,22 +1835,20 @@ static struct fuse_file *__fuse_write_file_get(struct fuse_conn *fc,
        return ff;
 }
 
        return ff;
 }
 
-static struct fuse_file *fuse_write_file_get(struct fuse_conn *fc,
-                                            struct fuse_inode *fi)
+static struct fuse_file *fuse_write_file_get(struct fuse_inode *fi)
 {
 {
-       struct fuse_file *ff = __fuse_write_file_get(fc, fi);
+       struct fuse_file *ff = __fuse_write_file_get(fi);
        WARN_ON(!ff);
        return ff;
 }
 
 int fuse_write_inode(struct inode *inode, struct writeback_control *wbc)
 {
        WARN_ON(!ff);
        return ff;
 }
 
 int fuse_write_inode(struct inode *inode, struct writeback_control *wbc)
 {
-       struct fuse_conn *fc = get_fuse_conn(inode);
        struct fuse_inode *fi = get_fuse_inode(inode);
        struct fuse_file *ff;
        int err;
 
        struct fuse_inode *fi = get_fuse_inode(inode);
        struct fuse_file *ff;
        int err;
 
-       ff = __fuse_write_file_get(fc, fi);
+       ff = __fuse_write_file_get(fi);
        err = fuse_flush_times(inode, ff);
        if (ff)
                fuse_file_put(ff, false, false);
        err = fuse_flush_times(inode, ff);
        if (ff)
                fuse_file_put(ff, false, false);
@@ -1915,7 +1912,7 @@ static int fuse_writepage_locked(struct page *page)
                goto err_free;
 
        error = -EIO;
                goto err_free;
 
        error = -EIO;
-       wpa->ia.ff = fuse_write_file_get(fc, fi);
+       wpa->ia.ff = fuse_write_file_get(fi);
        if (!wpa->ia.ff)
                goto err_nofile;
 
        if (!wpa->ia.ff)
                goto err_nofile;
 
@@ -2135,7 +2132,7 @@ static int fuse_writepages_fill(struct page *page,
 
        if (!data->ff) {
                err = -EIO;
 
        if (!data->ff) {
                err = -EIO;
-               data->ff = fuse_write_file_get(fc, fi);
+               data->ff = fuse_write_file_get(fi);
                if (!data->ff)
                        goto out_unlock;
        }
                if (!data->ff)
                        goto out_unlock;
        }