Skip to content

Commit

Permalink
fuse: redundant get_fuse_inode() calls in fuse_writepages_fill()
Browse files Browse the repository at this point in the history
Currently fuse_writepages_fill() calls get_fuse_inode() few times with
the same argument.

Signed-off-by: Vasily Averin <[email protected]>
Signed-off-by: Miklos Szeredi <[email protected]>
  • Loading branch information
vaverin authored and Miklos Szeredi committed Oct 23, 2019
1 parent 9de55a3 commit 091d1a7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions fs/fuse/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 091d1a7

Please sign in to comment.