diff options
author | Mark Fasheh <mark.fasheh@oracle.com> | 2007-03-22 16:53:23 -0700 |
---|---|---|
committer | Mark Fasheh <mark.fasheh@oracle.com> | 2007-04-26 15:07:40 -0700 |
commit | 8110b073a9135acf0a71bccfc20c0d1023f179c6 (patch) | |
tree | b668738e25648f3fcfd7b1063ab8d4948cebc668 /fs/ocfs2/aops.c | |
parent | 4f902c37727bbedbc0508a1477874c58ddcc9af8 (diff) | |
download | kernel_samsung_aries-8110b073a9135acf0a71bccfc20c0d1023f179c6.zip kernel_samsung_aries-8110b073a9135acf0a71bccfc20c0d1023f179c6.tar.gz kernel_samsung_aries-8110b073a9135acf0a71bccfc20c0d1023f179c6.tar.bz2 |
ocfs2: Fix up i_blocks calculation to know about holes
Older file systems which didn't support holes did a dumb calculation of
i_blocks based on i_size. This is no longer accurate, so fix things up to
take actual allocation into account.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/aops.c')
-rw-r--r-- | fs/ocfs2/aops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index ff71e0b..b74971e 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c @@ -1271,7 +1271,7 @@ ssize_t ocfs2_buffered_write_cluster(struct file *file, loff_t pos, i_size_write(inode, pos); mark_inode_dirty(inode); } - inode->i_blocks = ocfs2_align_bytes_to_sectors((u64)(i_size_read(inode))); + inode->i_blocks = ocfs2_inode_sector_count(inode); di->i_size = cpu_to_le64((u64)i_size_read(inode)); inode->i_mtime = inode->i_ctime = CURRENT_TIME; di->i_mtime = di->i_ctime = cpu_to_le64(inode->i_mtime.tv_sec); |