[RFC,1/2] fs/fuse kio: fix range calculation in map_inject_flush_req()

Submitted by Pavel Butsykin on June 5, 2019, 10:35 a.m.

Details

Message ID 20190605103540.14775-1-pbutsykin@virtuozzo.com
State New
Series "Series without cover letter"
Headers show

Commit Message

Pavel Butsykin June 5, 2019, 10:35 a.m.
Actually, this patch will not significantly change anything, because
PCS_REQ_T_SYNC request in the kernel is always prepared with zero size.
But in any case, it's better to fix it so that there is no unnecessary
confusion.

Signed-off-by: Pavel Butsykin <pbutsykin@virtuozzo.com>
---
 fs/fuse/kio/pcs/pcs_map.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/fs/fuse/kio/pcs/pcs_map.c b/fs/fuse/kio/pcs/pcs_map.c
index d70ef8fea70e..70be51b025d9 100644
--- a/fs/fuse/kio/pcs/pcs_map.c
+++ b/fs/fuse/kio/pcs/pcs_map.c
@@ -3116,7 +3116,7 @@  void map_inject_flush_req(struct pcs_int_request *ireq)
 	INIT_LIST_HEAD(&ireq_list);
 
 	idx = ireq->apireq.req->pos >> DENTRY_CHUNK_SIZE_BITS(di);
-	end = (ireq->apireq.req->pos + ireq->apireq.req->size) >> DENTRY_CHUNK_SIZE_BITS(di);
+	end = ireq->apireq.req->pos + ireq->apireq.req->size;
 	if (end <= ireq->apireq.req->pos)
 		end = ~0ULL;
 	end_idx = end >> DENTRY_CHUNK_SIZE_BITS(di);