]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] hugetlb: initialize sb->s_maxbytes
authorWilliam Lee Irwin III <wli@holomorphy.com>
Sat, 9 Oct 2004 08:03:38 +0000 (01:03 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 9 Oct 2004 08:03:38 +0000 (01:03 -0700)
hugetblfs appears not to support the creation of files larger than 2GB.
hugetlbfs_vmtruncate() checks against the s_maxbytes member of the super
block and returns EFBIG if the requested file size is too large.

Signed-off-by: Guy Cardwell <gcardwel@motorola.com>
Signed-off-by: William Irwin <wli@holomorphy.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/hugetlbfs/inode.c

index bd00082a20964ea270ecab23365cc29082e71331..6e7aeff355afe50685269b23b5b1a7574ba3639f 100644 (file)
@@ -651,6 +651,7 @@ hugetlbfs_fill_super(struct super_block *sb, void *data, int silent)
        sbinfo->free_blocks = config.nr_blocks;
        sbinfo->max_inodes = config.nr_inodes;
        sbinfo->free_inodes = config.nr_inodes;
+       sb->s_maxbytes = MAX_LFS_FILESIZE;
        sb->s_blocksize = HPAGE_SIZE;
        sb->s_blocksize_bits = HPAGE_SHIFT;
        sb->s_magic = HUGETLBFS_MAGIC;