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

Pavel Butsykin pbutsykin at virtuozzo.com
Wed Jun 5 13:35:39 MSK 2019


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 at virtuozzo.com>
---
 fs/fuse/kio/pcs/pcs_map.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);
-- 
2.15.1



More information about the Devel mailing list