diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-26 10:50:16 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-26 10:50:16 -0500 |
commit | adefe11c5383face09068176af7dd4e3a80d8f6b (patch) | |
tree | 9a24b21e5b5ab6ae721c3b09f28bb3901e246705 /fs/ext4/ialloc.c | |
parent | 3d6ce332537ad0a6f77caa469e09d7335187767b (diff) | |
parent | 5606bf5d0cbfbc3dfa78793a3793c43dd045fb1b (diff) |
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
ext4: add missing ext4_journal_stop()
ext4: ext4_find_next_zero_bit needs an aligned address on some arch
ext4: set EXT4_EXTENTS_FL only for directory and regular files
ext4: Don't mark filesystem error if fallocate fails
ext4: Fix BUG when writing to an unitialized extent
ext4: Don't use ext4_dec_count() if not needed
ext4: modify block allocation algorithm for the last group
ext4: Don't claim block from group which has corrupt bitmap
ext4: Get journal write access before modifying the extent tree
ext4: Fix memory and buffer head leak in callers to ext4_ext_find_extent()
ext4: Don't leave behind a half-created inode if ext4_mkdir() fails
ext4: Fix kernel BUG at fs/ext4/mballoc.c:910!
ext4: Fix locking hierarchy violation in ext4_fallocate()
Remove incorrect BKL comments in ext4
Diffstat (limited to 'fs/ext4/ialloc.c')
-rw-r--r-- | fs/ext4/ialloc.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index da18a74b966a..8036b9b5376b 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c | |||
@@ -702,7 +702,12 @@ got: | |||
702 | ei->i_dir_start_lookup = 0; | 702 | ei->i_dir_start_lookup = 0; |
703 | ei->i_disksize = 0; | 703 | ei->i_disksize = 0; |
704 | 704 | ||
705 | ei->i_flags = EXT4_I(dir)->i_flags & ~EXT4_INDEX_FL; | 705 | /* |
706 | * Don't inherit extent flag from directory. We set extent flag on | ||
707 | * newly created directory and file only if -o extent mount option is | ||
708 | * specified | ||
709 | */ | ||
710 | ei->i_flags = EXT4_I(dir)->i_flags & ~(EXT4_INDEX_FL|EXT4_EXTENTS_FL); | ||
706 | if (S_ISLNK(mode)) | 711 | if (S_ISLNK(mode)) |
707 | ei->i_flags &= ~(EXT4_IMMUTABLE_FL|EXT4_APPEND_FL); | 712 | ei->i_flags &= ~(EXT4_IMMUTABLE_FL|EXT4_APPEND_FL); |
708 | /* dirsync only applies to directories */ | 713 | /* dirsync only applies to directories */ |
@@ -745,12 +750,15 @@ got: | |||
745 | goto fail_free_drop; | 750 | goto fail_free_drop; |
746 | } | 751 | } |
747 | if (test_opt(sb, EXTENTS)) { | 752 | if (test_opt(sb, EXTENTS)) { |
748 | EXT4_I(inode)->i_flags |= EXT4_EXTENTS_FL; | 753 | /* set extent flag only for directory and file */ |
749 | ext4_ext_tree_init(handle, inode); | 754 | if (S_ISDIR(mode) || S_ISREG(mode)) { |
750 | err = ext4_update_incompat_feature(handle, sb, | 755 | EXT4_I(inode)->i_flags |= EXT4_EXTENTS_FL; |
751 | EXT4_FEATURE_INCOMPAT_EXTENTS); | 756 | ext4_ext_tree_init(handle, inode); |
752 | if (err) | 757 | err = ext4_update_incompat_feature(handle, sb, |
753 | goto fail; | 758 | EXT4_FEATURE_INCOMPAT_EXTENTS); |
759 | if (err) | ||
760 | goto fail; | ||
761 | } | ||
754 | } | 762 | } |
755 | 763 | ||
756 | ext4_debug("allocating inode %lu\n", inode->i_ino); | 764 | ext4_debug("allocating inode %lu\n", inode->i_ino); |