ocfs2/dlm: use GFP_ATOMIC inside a spin_lock
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 26 Jul 2012 13:05:05 +0000 (16:05 +0300)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 26 Feb 2013 07:46:13 +0000 (02:46 -0500)
My static checker complains that this is called with a spin_lock held
in dlm_master_requery_handler() from dlmrecovery.c.  Probably the reason
we have not received any bug reports about this is that recovery is not
a common operation.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/ocfs2/dlm/dlmmaster.c

index 005261c333b090f5f53f376bd5bbed55b8e16ba7..33ecbe0e6734a7deaf0c8712934b9eb78fb44197 100644 (file)
@@ -2020,7 +2020,7 @@ int dlm_dispatch_assert_master(struct dlm_ctxt *dlm,
                               int ignore_higher, u8 request_from, u32 flags)
 {
        struct dlm_work_item *item;
-       item = kzalloc(sizeof(*item), GFP_NOFS);
+       item = kzalloc(sizeof(*item), GFP_ATOMIC);
        if (!item)
                return -ENOMEM;