aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext3/dir.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2011-05-30 07:29:20 -0400
committerJan Kara <jack@suse.cz>2011-06-25 11:29:52 -0400
commitad95c5e9bc8b5885f94dce720137cac8fa8da4c9 (patch)
tree6a882f483b73f1c1590a61268261397345dd8e96 /fs/ext3/dir.c
parentbd5c9e1854e13d0c62a3de29a5fbc15dd6a4d8c6 (diff)
ext3: Fix oops in ext3_try_to_allocate_with_rsv()
Block allocation is called from two places: ext3_get_blocks_handle() and ext3_xattr_block_set(). These two callers are not necessarily synchronized because xattr code holds only xattr_sem and i_mutex, and ext3_get_blocks_handle() may hold only truncate_mutex when called from writepage() path. Block reservation code does not expect two concurrent allocations to happen to the same inode and thus assertions can be triggered or reservation structure corruption can occur. Fix the problem by taking truncate_mutex in xattr code to serialize allocations. CC: Sage Weil <sage@newdream.net> CC: stable@kernel.org Reported-by: Fyodor Ustinov <ufm@ufm.su> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext3/dir.c')
0 files changed, 0 insertions, 0 deletions