summaryrefslogtreecommitdiff
path: root/fs/jfs/super.c
diff options
context:
space:
mode:
authorDave Kleikamp <dave.kleikamp@oracle.com>2017-09-01 00:46:59 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2017-09-01 03:02:21 +0300
commitc227390c91a355300f47f9bef0aefbdfaaca1500 (patch)
tree0e2d9bd9eb695c55da12ccb7419ca90ccc26ebbd /fs/jfs/super.c
parent42ff72cf27027fa28dd79acabe01d9196f1480a7 (diff)
downloadlinux-c227390c91a355300f47f9bef0aefbdfaaca1500.tar.xz
jfs should use MAX_LFS_FILESIZE when calculating s_maxbytes
jfs had previously avoided the use of MAX_LFS_FILESIZE because it hadn't accounted for the whole 32-bit index range on 32-bit systems. That has been fixed by commit 0cc3b0ec23ce ("Clarify (and fix) MAX_LFS_FILESIZE macros"), so we can simplify the code now. Suggested by Andreas Dilger. Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com> Reviewed-by: Andreas Dilger <adilger@dilger.ca> Cc: jfs-discussion@lists.sourceforge.net Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/jfs/super.c')
-rw-r--r--fs/jfs/super.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/fs/jfs/super.c b/fs/jfs/super.c
index 78b41e1d5c67..60726ae7cf26 100644
--- a/fs/jfs/super.c
+++ b/fs/jfs/super.c
@@ -619,16 +619,10 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent)
if (!sb->s_root)
goto out_no_root;
- /* logical blocks are represented by 40 bits in pxd_t, etc. */
- sb->s_maxbytes = ((u64) sb->s_blocksize) << 40;
-#if BITS_PER_LONG == 32
- /*
- * Page cache is indexed by long.
- * I would use MAX_LFS_FILESIZE, but it's only half as big
+ /* logical blocks are represented by 40 bits in pxd_t, etc.
+ * and page cache is indexed by long
*/
- sb->s_maxbytes = min(((u64) PAGE_SIZE << 32) - 1,
- (u64)sb->s_maxbytes);
-#endif
+ sb->s_maxbytes = min(((loff_t)sb->s_blocksize) << 40, MAX_LFS_FILESIZE);
sb->s_time_gran = 1;
return 0;