fuse: fix writepages on 32bit
authorMiklos Szeredi <mszeredi@redhat.com>
Wed, 24 Apr 2019 15:05:06 +0000 (17:05 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Wed, 24 Apr 2019 15:05:06 +0000 (17:05 +0200)
commit9de5be06d0a89ca97b5ab902694d42dfd2bb77d2
tree6bee5c6e567702d3c8b98bfed6961a4eb17ae9dc
parent085b7755808aa11f78ab9377257e1dad2e6fa4bb
fuse: fix writepages on 32bit

Writepage requests were cropped to i_size & 0xffffffff, which meant that
mmaped writes to any file larger than 4G might be silently discarded.

Fix by storing the file size in a properly sized variable (loff_t instead
of size_t).

Reported-by: Antonio SJ Musumeci <trapexit@spawn.link>
Fixes: 6eaf4782eb09 ("fuse: writepages: crop secondary requests")
Cc: <stable@vger.kernel.org> # v3.13
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/file.c