diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-21 13:50:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-21 13:50:28 -0400 |
commit | 7ce1418f95e918cfc5ad36e3ec3431145c768cd0 (patch) | |
tree | 10fd5bf66a5d0cb71cbf0ffb17b354969a7cc4c4 /fs/ext2/ialloc.c | |
parent | a6f039869ff87e0a8d621e31d14bbb120c1dfa93 (diff) | |
parent | 1907131bbeabb33db313bad34f3ec1a5faedbd64 (diff) |
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6: (31 commits)
dquot: Detect partial write error to quota file in write_blk() and add printk_ratelimit for quota error messages
ocfs2: Fix lock inversion in quotas during umount
ocfs2: Use __dquot_transfer to avoid lock inversion
ocfs2: Fix NULL pointer deref when writing local dquot
ocfs2: Fix estimate of credits needed for quota allocation
ocfs2: Fix quota locking
ocfs2: Avoid unnecessary block mapping when refreshing quota info
ocfs2: Do not map blocks from local quota file on each write
quota: Refactor dquot_transfer code so that OCFS2 can pass in its references
quota: unify quota init condition in setattr
quota: remove sb_has_quota_active in get/set_info
quota: unify ->set_dqblk
quota: unify ->get_dqblk
ext3: make barrier options consistent with ext4
quota: Make quota stat accounting lockless.
suppress warning: "quotatypes" defined but not used
ext3: Fix waiting on transaction during fsync
jbd: Provide function to check whether transaction will issue data barrier
ufs: add ufs speciffic ->setattr call
BKL: Remove BKL from ext2 filesystem
...
Diffstat (limited to 'fs/ext2/ialloc.c')
-rw-r--r-- | fs/ext2/ialloc.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/ext2/ialloc.c b/fs/ext2/ialloc.c index ad7d572ee8dc..f0c5286f9342 100644 --- a/fs/ext2/ialloc.c +++ b/fs/ext2/ialloc.c | |||
@@ -106,7 +106,7 @@ void ext2_free_inode (struct inode * inode) | |||
106 | struct super_block * sb = inode->i_sb; | 106 | struct super_block * sb = inode->i_sb; |
107 | int is_directory; | 107 | int is_directory; |
108 | unsigned long ino; | 108 | unsigned long ino; |
109 | struct buffer_head *bitmap_bh = NULL; | 109 | struct buffer_head *bitmap_bh; |
110 | unsigned long block_group; | 110 | unsigned long block_group; |
111 | unsigned long bit; | 111 | unsigned long bit; |
112 | struct ext2_super_block * es; | 112 | struct ext2_super_block * es; |
@@ -135,14 +135,13 @@ void ext2_free_inode (struct inode * inode) | |||
135 | ino > le32_to_cpu(es->s_inodes_count)) { | 135 | ino > le32_to_cpu(es->s_inodes_count)) { |
136 | ext2_error (sb, "ext2_free_inode", | 136 | ext2_error (sb, "ext2_free_inode", |
137 | "reserved or nonexistent inode %lu", ino); | 137 | "reserved or nonexistent inode %lu", ino); |
138 | goto error_return; | 138 | return; |
139 | } | 139 | } |
140 | block_group = (ino - 1) / EXT2_INODES_PER_GROUP(sb); | 140 | block_group = (ino - 1) / EXT2_INODES_PER_GROUP(sb); |
141 | bit = (ino - 1) % EXT2_INODES_PER_GROUP(sb); | 141 | bit = (ino - 1) % EXT2_INODES_PER_GROUP(sb); |
142 | brelse(bitmap_bh); | ||
143 | bitmap_bh = read_inode_bitmap(sb, block_group); | 142 | bitmap_bh = read_inode_bitmap(sb, block_group); |
144 | if (!bitmap_bh) | 143 | if (!bitmap_bh) |
145 | goto error_return; | 144 | return; |
146 | 145 | ||
147 | /* Ok, now we can actually update the inode bitmaps.. */ | 146 | /* Ok, now we can actually update the inode bitmaps.. */ |
148 | if (!ext2_clear_bit_atomic(sb_bgl_lock(EXT2_SB(sb), block_group), | 147 | if (!ext2_clear_bit_atomic(sb_bgl_lock(EXT2_SB(sb), block_group), |
@@ -154,7 +153,7 @@ void ext2_free_inode (struct inode * inode) | |||
154 | mark_buffer_dirty(bitmap_bh); | 153 | mark_buffer_dirty(bitmap_bh); |
155 | if (sb->s_flags & MS_SYNCHRONOUS) | 154 | if (sb->s_flags & MS_SYNCHRONOUS) |
156 | sync_dirty_buffer(bitmap_bh); | 155 | sync_dirty_buffer(bitmap_bh); |
157 | error_return: | 156 | |
158 | brelse(bitmap_bh); | 157 | brelse(bitmap_bh); |
159 | } | 158 | } |
160 | 159 | ||