From 46cea955b762a2b3674e90ed4d32177deaca496b Mon Sep 17 00:00:00 2001 From: Mark Fasheh Date: Tue, 5 Aug 2008 11:32:46 -0700 Subject: [PATCH] --- yaml --- r: 109179 b: refs/heads/master c: 9780eb6cfaf7d2d5ccc061eaf94e7aec6a17791e h: refs/heads/master i: 109177: 0784e5efe698ea3ffcb3e321b9d6cde4e86c2d77 109175: 80248627af3f350c45e4bbfcfeb2e99634ea098e v: v3 --- [refs] | 2 +- trunk/fs/ocfs2/dir.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index ef7e97b7985d..cf9431320133 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 83cab5338fa8c74f979223698c8d4cc88f2ab68e +refs/heads/master: 9780eb6cfaf7d2d5ccc061eaf94e7aec6a17791e diff --git a/trunk/fs/ocfs2/dir.c b/trunk/fs/ocfs2/dir.c index 8e9c4a47d819..9cce563fd627 100644 --- a/trunk/fs/ocfs2/dir.c +++ b/trunk/fs/ocfs2/dir.c @@ -1300,7 +1300,6 @@ static int ocfs2_expand_inline_dir(struct inode *dir, struct buffer_head *di_bh, di->i_size = cpu_to_le64(sb->s_blocksize); di->i_ctime = di->i_mtime = cpu_to_le64(dir->i_ctime.tv_sec); di->i_ctime_nsec = di->i_mtime_nsec = cpu_to_le32(dir->i_ctime.tv_nsec); - dir->i_blocks = ocfs2_inode_sector_count(dir); /* * This should never fail as our extent list is empty and all @@ -1313,6 +1312,12 @@ static int ocfs2_expand_inline_dir(struct inode *dir, struct buffer_head *di_bh, goto out_commit; } + /* + * Set i_blocks after the extent insert for the most up to + * date ip_clusters value. + */ + dir->i_blocks = ocfs2_inode_sector_count(dir); + ret = ocfs2_journal_dirty(handle, di_bh); if (ret) { mlog_errno(ret);