aboutsummaryrefslogtreecommitdiff
path: root/fs/ext4/inode.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-07-22 11:16:31 +0100
committerMark Brown <broonie@linaro.org>2013-07-22 11:16:31 +0100
commitc04ee7fcbfba1471af90cf6407370efc779c1243 (patch)
treec0c37c40beb8bd197b7f424a67f12487960c4882 /fs/ext4/inode.c
parente0749524b57019f480ad6c581431589d053e0cb0 (diff)
parent0f4a56e16d5fc9028b62ba529177a3109513e111 (diff)
Merge tag 'v3.10.2' into linux-linaro-lsklsk
This is the 3.10.2 stable release
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r--fs/ext4/inode.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index d6382b89ecb..ccbfbbb12dc 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -1118,10 +1118,13 @@ static int ext4_write_end(struct file *file,
}
}
- if (ext4_has_inline_data(inode))
- copied = ext4_write_inline_data_end(inode, pos, len,
- copied, page);
- else
+ if (ext4_has_inline_data(inode)) {
+ ret = ext4_write_inline_data_end(inode, pos, len,
+ copied, page);
+ if (ret < 0)
+ goto errout;
+ copied = ret;
+ } else
copied = block_write_end(file, mapping, pos,
len, copied, page, fsdata);
@@ -4805,7 +4808,7 @@ int ext4_getattr(struct vfsmount *mnt, struct dentry *dentry,
struct kstat *stat)
{
struct inode *inode;
- unsigned long delalloc_blocks;
+ unsigned long long delalloc_blocks;
inode = dentry->d_inode;
generic_fillattr(inode, stat);
@@ -4823,7 +4826,7 @@ int ext4_getattr(struct vfsmount *mnt, struct dentry *dentry,
delalloc_blocks = EXT4_C2B(EXT4_SB(inode->i_sb),
EXT4_I(inode)->i_reserved_data_blocks);
- stat->blocks += (delalloc_blocks << inode->i_sb->s_blocksize_bits)>>9;
+ stat->blocks += delalloc_blocks << (inode->i_sb->s_blocksize_bits-9);
return 0;
}