fs/ocfs2/dlm: Use GFP_ATOMIC under spin_lock
authorDavid Sterba <dsterba@suse.cz>
Tue, 2 Nov 2010 22:36:02 +0000 (23:36 +0100)
committerJoel Becker <joel.becker@oracle.com>
Thu, 18 Nov 2010 22:10:55 +0000 (14:10 -0800)
commita48a982a6bd3896274dd643397c72da9258411e2
treed94208ff3ec315325eef3eaf365a9d71451ba3b2
parent2811036a19624168ff9342bb85421dbbb1d2ac0d
fs/ocfs2/dlm: Use GFP_ATOMIC under spin_lock

coccinelle check scripts/coccinelle/locks/call_kern.cocci found that
in fs/ocfs2/dlm/dlmdomain.c an allocation with GFP_KERNEL is done
with locks held:

dlm_query_region_handler
  spin_lock(dlm_domain_lock)
    dlm_match_regions
      kmalloc(GFP_KERNEL)

Change it to GFP_ATOMIC.

Signed-off-by: David Sterba <dsterba@suse.cz>
CC: Joel Becker <joel.becker@oracle.com>
CC: Mark Fasheh <mfasheh@suse.com>
CC: ocfs2-devel@oss.oracle.com
--
Exists in v2.6.37-rc1 and current linux-next.
Signed-off-by: Joel Becker <joel.becker@oracle.com>
fs/ocfs2/dlm/dlmdomain.c