diff options
author | Mark Fasheh <mark.fasheh@oracle.com> | 2007-03-23 00:53:23 +0100 |
---|---|---|
committer | Mark Fasheh <mark.fasheh@oracle.com> | 2007-04-27 00:07:40 +0200 |
commit | 8110b073a9135acf0a71bccfc20c0d1023f179c6 (patch) | |
tree | b668738e25648f3fcfd7b1063ab8d4948cebc668 /fs/ocfs2/file.c | |
parent | ocfs2: Fix extent lookup to return true size of holes (diff) | |
download | linux-8110b073a9135acf0a71bccfc20c0d1023f179c6.tar.xz linux-8110b073a9135acf0a71bccfc20c0d1023f179c6.zip |
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/file.c')
-rw-r--r-- | fs/ocfs2/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index f516619a3744..e34474c04678 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -216,7 +216,7 @@ int ocfs2_set_inode_size(handle_t *handle, mlog_entry_void(); i_size_write(inode, new_i_size); - inode->i_blocks = ocfs2_align_bytes_to_sectors(new_i_size); + inode->i_blocks = ocfs2_inode_sector_count(inode); inode->i_ctime = inode->i_mtime = CURRENT_TIME; status = ocfs2_mark_inode_dirty(handle, inode, fe_bh); |