From abd0a98485756caad5e7297669f8788c167b6b2b Mon Sep 17 00:00:00 2001 From: izxl007 Date: Sun, 22 Jun 2025 20:00:39 +0800 Subject: Clarify offset field is signed despite uint64_t type Add comment noting that the uint64_t offset in fuse_lseek_in is derived from kernel loff_t and should be treated as signed for negative offsets. Signed-off-by: izxl007 --- lib/fuse_lowlevel.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c index 13c05c6..8ddc288 100644 --- a/lib/fuse_lowlevel.c +++ b/lib/fuse_lowlevel.c @@ -2402,6 +2402,10 @@ static void do_copy_file_range(fuse_req_t req, const fuse_ino_t nodeid_in, _do_copy_file_range(req, nodeid_in, inarg, NULL); } +/* + * Note that the uint64_t offset in struct fuse_lseek_in is derived from + * linux kernel loff_t and is therefore signed. + */ static void _do_lseek(fuse_req_t req, const fuse_ino_t nodeid, const void *op_in, const void *in_payload) { -- cgit v1.2.3