]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: synchronize ext4_mb_init_group() with buddy page lock
authorAmir Goldstein <amir73il@users.sf.net>
Tue, 10 May 2011 01:48:13 +0000 (21:48 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 10 May 2011 01:48:13 +0000 (21:48 -0400)
commitb61ea38213c63126ea742bd1e6f798cd8f375c1f
tree083909f3bad86d16a1a65511771945b2ccbb917f
parent7be4956178a7f1c78706fa29110d323b24e1d7d2
ext4: synchronize ext4_mb_init_group() with buddy page lock

The old routines ext4_mb_[get|put]_buddy_cache_lock(), which used
to take grp->alloc_sem for all groups on the buddy page have been
replaced with the routines ext4_mb_[get|put]_buddy_page_lock().

The new routines take both buddy and bitmap page locks to protect
against concurrent init of groups on the same buddy page.

The GROUP_NEED_INIT flag is tested again under page lock to check
if the group was initialized by another caller.

Signed-off-by: Amir Goldstein <amir73il@users.sf.net>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/mballoc.c