diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-13 10:34:57 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-13 10:34:57 -0800 |
commit | 96e80a7851b44f3decaac0625665cd64e550b71d (patch) | |
tree | a24d9f46c43b5fcf824c49b93d37982ab668aade /fs/squashfs/inode.c | |
parent | 57e6a7dde8cfca9ac1d6702cf9104d22bc11ba90 (diff) | |
parent | 3d4a1c80c4eb97187b3a61b3bfa8c804327f7a45 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-next
* git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-next:
Squashfs: fix i_blocks calculation with extended regular files
Squashfs: fix mount time sanity check for corrupted superblock
Squashfs: optimise squashfs_cache_get entry search
Squashfs: Update documentation to include xattrs
Squashfs: add missing block release on error condition
Diffstat (limited to 'fs/squashfs/inode.c')
-rw-r--r-- | fs/squashfs/inode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/squashfs/inode.c b/fs/squashfs/inode.c index fd7b3b3bda1..81afbccfa84 100644 --- a/fs/squashfs/inode.c +++ b/fs/squashfs/inode.c @@ -208,8 +208,8 @@ int squashfs_read_inode(struct inode *inode, long long ino) inode->i_op = &squashfs_inode_ops; inode->i_fop = &generic_ro_fops; inode->i_mode |= S_IFREG; - inode->i_blocks = ((inode->i_size - - le64_to_cpu(sqsh_ino->sparse) - 1) >> 9) + 1; + inode->i_blocks = (inode->i_size - + le64_to_cpu(sqsh_ino->sparse) + 511) >> 9; squashfs_i(inode)->fragment_block = frag_blk; squashfs_i(inode)->fragment_size = frag_size; |