Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 86392
b: refs/heads/master
c: 42bf038
h: refs/heads/master
v: v3
  • Loading branch information
Aneesh Kumar K.V authored and Theodore Ts'o committed Feb 25, 2008
1 parent 7c33b17 commit adecda9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2c98615d3b64ce7888cd46cc668023f456daf287
refs/heads/master: 42bf0383d1e09dd1b38f3debb13a76b2f87634b3
22 changes: 15 additions & 7 deletions trunk/fs/ext4/ialloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,12 @@ struct inode *ext4_new_inode(handle_t *handle, struct inode * dir, int mode)
ei->i_dir_start_lookup = 0;
ei->i_disksize = 0;

ei->i_flags = EXT4_I(dir)->i_flags & ~EXT4_INDEX_FL;
/*
* Don't inherit extent flag from directory. We set extent flag on
* newly created directory and file only if -o extent mount option is
* specified
*/
ei->i_flags = EXT4_I(dir)->i_flags & ~(EXT4_INDEX_FL|EXT4_EXTENTS_FL);
if (S_ISLNK(mode))
ei->i_flags &= ~(EXT4_IMMUTABLE_FL|EXT4_APPEND_FL);
/* dirsync only applies to directories */
Expand Down Expand Up @@ -745,12 +750,15 @@ struct inode *ext4_new_inode(handle_t *handle, struct inode * dir, int mode)
goto fail_free_drop;
}
if (test_opt(sb, EXTENTS)) {
EXT4_I(inode)->i_flags |= EXT4_EXTENTS_FL;
ext4_ext_tree_init(handle, inode);
err = ext4_update_incompat_feature(handle, sb,
EXT4_FEATURE_INCOMPAT_EXTENTS);
if (err)
goto fail;
/* set extent flag only for directory and file */
if (S_ISDIR(mode) || S_ISREG(mode)) {
EXT4_I(inode)->i_flags |= EXT4_EXTENTS_FL;
ext4_ext_tree_init(handle, inode);
err = ext4_update_incompat_feature(handle, sb,
EXT4_FEATURE_INCOMPAT_EXTENTS);
if (err)
goto fail;
}
}

ext4_debug("allocating inode %lu\n", inode->i_ino);
Expand Down
1 change: 0 additions & 1 deletion trunk/fs/ext4/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -2220,7 +2220,6 @@ static int ext4_symlink (struct inode * dir,
inode->i_op = &ext4_fast_symlink_inode_operations;
memcpy((char*)&EXT4_I(inode)->i_data,symname,l);
inode->i_size = l-1;
EXT4_I(inode)->i_flags &= ~EXT4_EXTENTS_FL;
}
EXT4_I(inode)->i_disksize = inode->i_size;
err = ext4_add_nondir(handle, dentry, inode);
Expand Down

0 comments on commit adecda9

Please sign in to comment.