summaryrefslogtreecommitdiff
path: root/fs/fuse
diff options
context:
space:
mode:
authorVasily Averin <vvs@virtuozzo.com>2019-08-19 08:48:26 +0300
committerMiklos Szeredi <mszeredi@redhat.com>2019-10-23 15:26:37 +0300
commit091d1a7267726ba162b12ce9332d76cdae602789 (patch)
treeece918d02287e9139ffc9cacc0448bd34408523a /fs/fuse
parent9de55a37fcc5f1550a743910f493197223f5e384 (diff)
downloadlinux-091d1a7267726ba162b12ce9332d76cdae602789.tar.xz
fuse: redundant get_fuse_inode() calls in fuse_writepages_fill()
Currently fuse_writepages_fill() calls get_fuse_inode() few times with the same argument. Signed-off-by: Vasily Averin <vvs@virtuozzo.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/fuse')
-rw-r--r--fs/fuse/file.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 6edf949b9139..db48a5cf8620 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -2001,7 +2001,7 @@ static int fuse_writepages_fill(struct page *page,
if (!data->ff) {
err = -EIO;
- data->ff = fuse_write_file_get(fc, get_fuse_inode(inode));
+ data->ff = fuse_write_file_get(fc, fi);
if (!data->ff)
goto out_unlock;
}
@@ -2046,8 +2046,6 @@ static int fuse_writepages_fill(struct page *page,
* under writeback, so we can release the page lock.
*/
if (data->wpa == NULL) {
- struct fuse_inode *fi = get_fuse_inode(inode);
-
err = -ENOMEM;
wpa = fuse_writepage_args_alloc();
if (!wpa) {