Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 260315
b: refs/heads/master
c: ad95c5e
h: refs/heads/master
i:
  260313: ebe3f12
  260311: a80823c
v: v3
  • Loading branch information
Jan Kara committed Jun 25, 2011
1 parent 6dfca75 commit 866d2df
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 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: bd5c9e1854e13d0c62a3de29a5fbc15dd6a4d8c6
refs/heads/master: ad95c5e9bc8b5885f94dce720137cac8fa8da4c9
12 changes: 10 additions & 2 deletions trunk/fs/ext3/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -803,8 +803,16 @@ ext3_xattr_block_set(handle_t *handle, struct inode *inode,
/* We need to allocate a new block */
ext3_fsblk_t goal = ext3_group_first_block_no(sb,
EXT3_I(inode)->i_block_group);
ext3_fsblk_t block = ext3_new_block(handle, inode,
goal, &error);
ext3_fsblk_t block;

/*
* Protect us agaist concurrent allocations to the
* same inode from ext3_..._writepage(). Reservation
* code does not expect racing allocations.
*/
mutex_lock(&EXT3_I(inode)->truncate_mutex);
block = ext3_new_block(handle, inode, goal, &error);
mutex_unlock(&EXT3_I(inode)->truncate_mutex);
if (error)
goto cleanup;
ea_idebug(inode, "creating block %d", block);
Expand Down

0 comments on commit 866d2df

Please sign in to comment.