diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2008-04-29 22:00:36 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2008-04-29 22:00:36 -0400 |
commit | 8753e88f1b4345677620ec68f847222a6301e2fd (patch) | |
tree | cd24e97014f89d9bbd0ea88b65ed59ea9d2e152e /fs/ext4 | |
parent | ef7377289a1510d638004158e43878643bc75dc5 (diff) | |
download | kernel_samsung_smdk4412-8753e88f1b4345677620ec68f847222a6301e2fd.zip kernel_samsung_smdk4412-8753e88f1b4345677620ec68f847222a6301e2fd.tar.gz kernel_samsung_smdk4412-8753e88f1b4345677620ec68f847222a6301e2fd.tar.bz2 |
ext4: mark inode dirty after initializing the extent tree
We should mark the inode dirty only after initializing the extent
tree. Also if we fail during extent initialization we need
to call DQUOT_FREE_INODE.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/ialloc.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index d59bdf7..c6efbab 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c @@ -739,11 +739,6 @@ got: if (err) goto fail_free_drop; - err = ext4_mark_inode_dirty(handle, inode); - if (err) { - ext4_std_error(sb, err); - goto fail_free_drop; - } if (test_opt(sb, EXTENTS)) { /* set extent flag only for diretory, file and normal symlink*/ if (S_ISDIR(mode) || S_ISREG(mode) || S_ISLNK(mode)) { @@ -752,10 +747,16 @@ got: err = ext4_update_incompat_feature(handle, sb, EXT4_FEATURE_INCOMPAT_EXTENTS); if (err) - goto fail; + goto fail_free_drop; } } + err = ext4_mark_inode_dirty(handle, inode); + if (err) { + ext4_std_error(sb, err); + goto fail_free_drop; + } + ext4_debug("allocating inode %lu\n", inode->i_ino); goto really_out; fail: |