headers: utsname.h redux
[deliverable/linux.git] / fs / ocfs2 / dlm / dlmthread.c
index d490b66ad9d75e1ca24667cd6a7c8626d30200e0..52ec020ea78b42f11ad83b3a2632dbcf08a20dde 100644 (file)
@@ -30,7 +30,6 @@
 #include <linux/types.h>
 #include <linux/slab.h>
 #include <linux/highmem.h>
-#include <linux/utsname.h>
 #include <linux/init.h>
 #include <linux/sysctl.h>
 #include <linux/random.h>
@@ -212,14 +211,18 @@ static int dlm_purge_lockres(struct dlm_ctxt *dlm,
                spin_lock(&dlm->spinlock);
        }
 
+       spin_lock(&res->spinlock);
        if (!list_empty(&res->purge)) {
                mlog(0, "removing lockres %.*s:%p from purgelist, "
                     "master = %d\n", res->lockname.len, res->lockname.name,
                     res, master);
                list_del_init(&res->purge);
+               spin_unlock(&res->spinlock);
                dlm_lockres_put(res);
                dlm->purge_count--;
-       }
+       } else
+               spin_unlock(&res->spinlock);
+
        __dlm_unhash_lockres(res);
 
        /* lockres is not in the hash now.  drop the flag and wake up
This page took 0.028986 seconds and 5 git commands to generate.