ext4: fix race in ext4_mb_add_n_trim()
authorNiu Yawei <yawei.niu@gmail.com>
Sat, 2 Feb 2013 02:31:27 +0000 (21:31 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 3 Mar 2013 22:09:05 +0000 (06:09 +0800)
commitfd80f53550720f200ca0469e9419c750f895ab50
tree9f38972a5c4df24ae1e780df97f5c85cffdbbf0f
parent5dec43e3d688390256df3343bb444e7ed0022f44
ext4: fix race in ext4_mb_add_n_trim()

commit f1167009711032b0d747ec89a632a626c901a1ad upstream.

In ext4_mb_add_n_trim(), lg_prealloc_lock should be taken when
changing the lg_prealloc_list.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/mballoc.c