summaryrefslogtreecommitdiff
path: root/fs/iomap/fiemap.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-05-02 11:31:12 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2020-05-02 11:31:12 -0700
commitf66ed1ebbfde37631fba289f7c399eaa70632abf (patch)
tree26d2658584a7ec456a55fdc3f63bcc5089220ba6 /fs/iomap/fiemap.c
parent29a47f456d6213a3173722a098a3a18865ea4db3 (diff)
parentb75dfde1212991b24b220c3995101c60a7b8ae74 (diff)
Merge tag 'iomap-5.7-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
Pull iomap fix from Darrick Wong: "Hoist the check for an unrepresentable FIBMAP return value into ioctl_fibmap. The internal kernel function can handle 64-bit values (and is needed to fix a regression on ext4 + jbd2). It is only the userspace ioctl that is so old that it cannot deal" * tag 'iomap-5.7-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: fibmap: Warn and return an error in case of block > INT_MAX
Diffstat (limited to 'fs/iomap/fiemap.c')
-rw-r--r--fs/iomap/fiemap.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/iomap/fiemap.c b/fs/iomap/fiemap.c
index bccf305ea9ce..d55e8f491a5e 100644
--- a/fs/iomap/fiemap.c
+++ b/fs/iomap/fiemap.c
@@ -117,10 +117,7 @@ iomap_bmap_actor(struct inode *inode, loff_t pos, loff_t length,
if (iomap->type == IOMAP_MAPPED) {
addr = (pos - iomap->offset + iomap->addr) >> inode->i_blkbits;
- if (addr > INT_MAX)
- WARN(1, "would truncate bmap result\n");
- else
- *bno = addr;
+ *bno = addr;
}
return 0;
}