iomap: Fix unsharing of an extent >2GB on a 32-bit machine
Subsystems (2)
PATCH 1/1 iomap: Fix unsharing of an extent >2GB on a 32-bit machine
From: "Matthew Wilcox (Oracle)" <[email protected]>
Widen the type used for counting the number of bytes unshared.
Signed-off-by Matthew Wilcox (Oracle) <[email protected]>
--- fs/iomap/buffered-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/iomap/buffered-io.c +1 -1
@@ -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 ))
Signature · 1 line
2.26.2
Quoted 3 lines · Matthew Wilcox
From: "Matthew Wilcox (Oracle)" <[email protected]>
Widen the type used for counting the number of bytes unshared.
Looks good, although at least for XFS we can't have that large extents anyway:
Reviewed-by Christoph Hellwig <[email protected]>
Quoted 5 lines · Matthew Wilcox
From: "Matthew Wilcox (Oracle)" <[email protected]>
Widen the type used for counting the number of bytes unshared.
Signed-off-by Matthew Wilcox (Oracle) <[email protected]>
Makes sense,
Reviewed-by Darrick J. Wong <[email protected]>
--D
Quoted 20 lines
--- fs/iomap/buffered-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/iomap/buffered-io.c +1
-1@@ -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 ))Signature · 1 line
2.26.2