Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 146381
b: refs/heads/master
c: bc8e674
h: refs/heads/master
i:
  146379: 9fcbb75
v: v3
  • Loading branch information
Vincent Minet authored and Theodore Ts'o committed May 15, 2009
1 parent ae64481 commit 1153bdf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 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: 955ce5f5be67dfe0d1d096b543af33fe8a1ce3dd
refs/heads/master: bc8e67409ccdcff72c3f1656b1fb1aad7ff396db
6 changes: 0 additions & 6 deletions trunk/fs/ext4/ext4.h
Original file line number Diff line number Diff line change
Expand Up @@ -1583,12 +1583,6 @@ static inline void ext4_unlock_group(struct super_block *sb,
spin_unlock(ext4_group_lock_ptr(sb, group));
}

static inline int ext4_is_group_locked(struct super_block *sb,
ext4_group_t group)
{
return spin_is_locked(ext4_group_lock_ptr(sb, group));
}

/*
* Inodes and files operations
*/
Expand Down
10 changes: 5 additions & 5 deletions trunk/fs/ext4/mballoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ static void mb_free_blocks_double(struct inode *inode, struct ext4_buddy *e4b,

if (unlikely(e4b->bd_info->bb_bitmap == NULL))
return;
BUG_ON(!ext4_is_group_locked(sb, e4b->bd_group));
assert_spin_locked(ext4_group_lock_ptr(sb, e4b->bd_group));
for (i = 0; i < count; i++) {
if (!mb_test_bit(first + i, e4b->bd_info->bb_bitmap)) {
ext4_fsblk_t blocknr;
Expand All @@ -460,7 +460,7 @@ static void mb_mark_used_double(struct ext4_buddy *e4b, int first, int count)

if (unlikely(e4b->bd_info->bb_bitmap == NULL))
return;
BUG_ON(!ext4_is_group_locked(e4b->bd_sb, e4b->bd_group));
assert_spin_locked(ext4_group_lock_ptr(e4b->bd_sb, e4b->bd_group));
for (i = 0; i < count; i++) {
BUG_ON(mb_test_bit(first + i, e4b->bd_info->bb_bitmap));
mb_set_bit(first + i, e4b->bd_info->bb_bitmap);
Expand Down Expand Up @@ -1115,7 +1115,7 @@ static void mb_free_blocks(struct inode *inode, struct ext4_buddy *e4b,
struct super_block *sb = e4b->bd_sb;

BUG_ON(first + count > (sb->s_blocksize << 3));
BUG_ON(!ext4_is_group_locked(sb, e4b->bd_group));
assert_spin_locked(ext4_group_lock_ptr(sb, e4b->bd_group));
mb_check_buddy(e4b);
mb_free_blocks_double(inode, e4b, first, count);

Expand Down Expand Up @@ -1196,7 +1196,7 @@ static int mb_find_extent(struct ext4_buddy *e4b, int order, int block,
int ord;
void *buddy;

BUG_ON(!ext4_is_group_locked(e4b->bd_sb, e4b->bd_group));
assert_spin_locked(ext4_group_lock_ptr(e4b->bd_sb, e4b->bd_group));
BUG_ON(ex == NULL);

buddy = mb_find_buddy(e4b, order, &max);
Expand Down Expand Up @@ -1260,7 +1260,7 @@ static int mb_mark_used(struct ext4_buddy *e4b, struct ext4_free_extent *ex)

BUG_ON(start + len > (e4b->bd_sb->s_blocksize << 3));
BUG_ON(e4b->bd_group != ex->fe_group);
BUG_ON(!ext4_is_group_locked(e4b->bd_sb, e4b->bd_group));
assert_spin_locked(ext4_group_lock_ptr(e4b->bd_sb, e4b->bd_group));
mb_check_buddy(e4b);
mb_mark_used_double(e4b, start, len);

Expand Down

0 comments on commit 1153bdf

Please sign in to comment.