From: Matthew Wilcox (Oracle) Date: Tue, 9 Jun 2020 03:58:29 +0000 (-0700) Subject: iomap: Fix unsharing of an extent >2GB on a 32-bit machine X-Git-Tag: v5.10.7~2317^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d4ff3b2ef901cd451fb8a9ff4623d060a79502cd;p=platform%2Fkernel%2Flinux-rpi.git iomap: Fix unsharing of an extent >2GB on a 32-bit machine Widen the type used for counting the number of bytes unshared. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong --- diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c index 89e2196..17ed7bb 100644 --- a/fs/iomap/buffered-io.c +++ b/fs/iomap/buffered-io.c @@ -909,7 +909,7 @@ iomap_unshare_actor(struct inode *inode, loff_t pos, loff_t length, void *data, struct iomap *iomap, struct iomap *srcmap) { long status = 0; - ssize_t written = 0; + loff_t written = 0; /* don't bother with blocks that are not shared to start with */ if (!(iomap->flags & IOMAP_F_SHARED))