]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/ext4/ialloc.c
ext4: mark inode dirty after initializing the extent tree
[linux-2.6-omap-h63xx.git] / fs / ext4 / ialloc.c
index d59bdf7233b50aacd285bce4882c51620c40bc51..c6efbab0c80187942dfcedc867d514c76badcefc 100644 (file)
@@ -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: