[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <c09509ef-982e-d4bd-ed0b-da8389a7d066@virtuozzo.com>
Date: Mon, 19 Aug 2019 08:48:26 +0300
From: Vasily Averin <vvs@...tuozzo.com>
To: linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
Miklos Szeredi <miklos@...redi.hu>
Subject: [PATCH] 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@...tuozzo.com>
---
fs/fuse/file.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index e076c2cf65b0..bc9b64ef7b5d 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1874,7 +1874,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;
}
@@ -1919,8 +1919,6 @@ static int fuse_writepages_fill(struct page *page,
* under writeback, so we can release the page lock.
*/
if (data->req == NULL) {
- struct fuse_inode *fi = get_fuse_inode(inode);
-
err = -ENOMEM;
req = fuse_request_alloc_nofs(FUSE_REQ_INLINE_PAGES);
if (!req) {
--
2.17.1
Powered by blists - more mailing lists