Thread (9 messages) 9 messages, 1 author, 2021-09-23

[PATCH V2 7/8] loop: remove extra variable in lo_req_flush

STALE1839d REVIEWED: 1 (0M)

From: Chaitanya Kulkarni <hidden>
Date: 2021-09-23 01:51:10
Subsystem: block layer, the rest · Maintainers: Jens Axboe, Linus Torvalds

Revision v2 of 2 in this series; 1 review trailer.

Revisions (2)
  1. v1 [diff vs current]
  2. v2 current
From: Chaitanya Kulkarni <kch@nvidia.com>

The local variable file is used to pass it to the vfs_fsync(). We can
get away with using lo->lo_backing_file instead of storing in a local
variable which is not used anywhere else.

No functional change in this patch.

Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Himanshu Madhani <redacted>
---
 drivers/block/loop.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 51c42788731a..6478d3b0dd2a 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -498,8 +498,7 @@ static int lo_fallocate(struct loop_device *lo, struct request *rq, loff_t pos,
 
 static int lo_req_flush(struct loop_device *lo, struct request *rq)
 {
-	struct file *file = lo->lo_backing_file;
-	int ret = vfs_fsync(file, 0);
+	int ret = vfs_fsync(lo->lo_backing_file, 0);
 	if (unlikely(ret && ret != -EINVAL))
 		ret = -EIO;
 
-- 
2.29.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help