diff options
Diffstat (limited to 'fs/ocfs2/dir.c')
-rw-r--r-- | fs/ocfs2/dir.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c index 8a1875848080..9cce563fd627 100644 --- a/fs/ocfs2/dir.c +++ b/fs/ocfs2/dir.c | |||
@@ -1300,7 +1300,6 @@ static int ocfs2_expand_inline_dir(struct inode *dir, struct buffer_head *di_bh, | |||
1300 | di->i_size = cpu_to_le64(sb->s_blocksize); | 1300 | di->i_size = cpu_to_le64(sb->s_blocksize); |
1301 | di->i_ctime = di->i_mtime = cpu_to_le64(dir->i_ctime.tv_sec); | 1301 | di->i_ctime = di->i_mtime = cpu_to_le64(dir->i_ctime.tv_sec); |
1302 | di->i_ctime_nsec = di->i_mtime_nsec = cpu_to_le32(dir->i_ctime.tv_nsec); | 1302 | di->i_ctime_nsec = di->i_mtime_nsec = cpu_to_le32(dir->i_ctime.tv_nsec); |
1303 | dir->i_blocks = ocfs2_inode_sector_count(dir); | ||
1304 | 1303 | ||
1305 | /* | 1304 | /* |
1306 | * This should never fail as our extent list is empty and all | 1305 | * This should never fail as our extent list is empty and all |
@@ -1310,9 +1309,15 @@ static int ocfs2_expand_inline_dir(struct inode *dir, struct buffer_head *di_bh, | |||
1310 | NULL); | 1309 | NULL); |
1311 | if (ret) { | 1310 | if (ret) { |
1312 | mlog_errno(ret); | 1311 | mlog_errno(ret); |
1313 | goto out; | 1312 | goto out_commit; |
1314 | } | 1313 | } |
1315 | 1314 | ||
1315 | /* | ||
1316 | * Set i_blocks after the extent insert for the most up to | ||
1317 | * date ip_clusters value. | ||
1318 | */ | ||
1319 | dir->i_blocks = ocfs2_inode_sector_count(dir); | ||
1320 | |||
1316 | ret = ocfs2_journal_dirty(handle, di_bh); | 1321 | ret = ocfs2_journal_dirty(handle, di_bh); |
1317 | if (ret) { | 1322 | if (ret) { |
1318 | mlog_errno(ret); | 1323 | mlog_errno(ret); |
@@ -1336,7 +1341,7 @@ static int ocfs2_expand_inline_dir(struct inode *dir, struct buffer_head *di_bh, | |||
1336 | len, 0, NULL); | 1341 | len, 0, NULL); |
1337 | if (ret) { | 1342 | if (ret) { |
1338 | mlog_errno(ret); | 1343 | mlog_errno(ret); |
1339 | goto out; | 1344 | goto out_commit; |
1340 | } | 1345 | } |
1341 | } | 1346 | } |
1342 | 1347 | ||