diff options
| author | Ingo Molnar <mingo@elte.hu> | 2009-01-12 05:32:03 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-01-12 05:32:03 -0500 |
| commit | e3ee1e123183ca9847e74b7b8e2694c9e3b817a6 (patch) | |
| tree | 652a84674ed05eaa46a813de2223af0bd0168a5a /fs/ext2/ialloc.c | |
| parent | 5762ba1873b0bb9faa631aaa02f533c2b9837f82 (diff) | |
| parent | c59765042f53a79a7a65585042ff463b69cb248c (diff) | |
Merge commit 'v2.6.29-rc1' into timers/hrtimers
Conflicts:
kernel/time/tick-common.c
Diffstat (limited to 'fs/ext2/ialloc.c')
| -rw-r--r-- | fs/ext2/ialloc.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/ext2/ialloc.c b/fs/ext2/ialloc.c index 8d0add625870..66321a877e74 100644 --- a/fs/ext2/ialloc.c +++ b/fs/ext2/ialloc.c | |||
| @@ -565,12 +565,8 @@ got: | |||
| 565 | inode->i_blocks = 0; | 565 | inode->i_blocks = 0; |
| 566 | inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC; | 566 | inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC; |
| 567 | memset(ei->i_data, 0, sizeof(ei->i_data)); | 567 | memset(ei->i_data, 0, sizeof(ei->i_data)); |
| 568 | ei->i_flags = EXT2_I(dir)->i_flags & ~EXT2_BTREE_FL; | 568 | ei->i_flags = |
| 569 | if (S_ISLNK(mode)) | 569 | ext2_mask_flags(mode, EXT2_I(dir)->i_flags & EXT2_FL_INHERITED); |
| 570 | ei->i_flags &= ~(EXT2_IMMUTABLE_FL|EXT2_APPEND_FL); | ||
| 571 | /* dirsync is only applied to directories */ | ||
| 572 | if (!S_ISDIR(mode)) | ||
| 573 | ei->i_flags &= ~EXT2_DIRSYNC_FL; | ||
| 574 | ei->i_faddr = 0; | 570 | ei->i_faddr = 0; |
| 575 | ei->i_frag_no = 0; | 571 | ei->i_frag_no = 0; |
| 576 | ei->i_frag_size = 0; | 572 | ei->i_frag_size = 0; |
| @@ -585,7 +581,10 @@ got: | |||
| 585 | spin_lock(&sbi->s_next_gen_lock); | 581 | spin_lock(&sbi->s_next_gen_lock); |
| 586 | inode->i_generation = sbi->s_next_generation++; | 582 | inode->i_generation = sbi->s_next_generation++; |
| 587 | spin_unlock(&sbi->s_next_gen_lock); | 583 | spin_unlock(&sbi->s_next_gen_lock); |
| 588 | insert_inode_hash(inode); | 584 | if (insert_inode_locked(inode) < 0) { |
| 585 | err = -EINVAL; | ||
| 586 | goto fail_drop; | ||
| 587 | } | ||
| 589 | 588 | ||
| 590 | if (DQUOT_ALLOC_INODE(inode)) { | 589 | if (DQUOT_ALLOC_INODE(inode)) { |
| 591 | err = -EDQUOT; | 590 | err = -EDQUOT; |
| @@ -612,6 +611,7 @@ fail_drop: | |||
| 612 | DQUOT_DROP(inode); | 611 | DQUOT_DROP(inode); |
| 613 | inode->i_flags |= S_NOQUOTA; | 612 | inode->i_flags |= S_NOQUOTA; |
| 614 | inode->i_nlink = 0; | 613 | inode->i_nlink = 0; |
| 614 | unlock_new_inode(inode); | ||
| 615 | iput(inode); | 615 | iput(inode); |
| 616 | return ERR_PTR(err); | 616 | return ERR_PTR(err); |
| 617 | 617 | ||
