VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Ritesh Harjani <riteshh@linux.ibm.com> 2020-04-30 07:57:46 -0700 committer: Darrick J. Wong <darrick.wong@oracle.com> 2020-04-30 07:57:46 -0700 commit: b75dfde1212991b24b220c3995101c60a7b8ae74 parent: 6a8b55ed4056ea5559ebe4f6a4b247f627870d4c
Commit Summary:
fibmap: Warn and return an error in case of block > INT_MAX
Diffstat:
1 file changed, 1 insertion, 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;
 }