]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/ocfs2/dlm/dlmunlock.c
ocfs2: use list_for_each_entry() instead of list_for_each()
[karo-tx-linux.git] / fs / ocfs2 / dlm / dlmunlock.c
index 850aa7e875377b76eaae054b675367aea157c13c..5698b52cf5c984c9e2e7bd21e68a76191dcc5abe 100644 (file)
@@ -388,7 +388,6 @@ int dlm_unlock_lock_handler(struct o2net_msg *msg, u32 len, void *data,
        struct dlm_ctxt *dlm = data;
        struct dlm_unlock_lock *unlock = (struct dlm_unlock_lock *)msg->buf;
        struct dlm_lock_resource *res = NULL;
-       struct list_head *iter;
        struct dlm_lock *lock = NULL;
        enum dlm_status status = DLM_NORMAL;
        int found = 0, i;
@@ -458,8 +457,7 @@ int dlm_unlock_lock_handler(struct o2net_msg *msg, u32 len, void *data,
        }
 
        for (i=0; i<3; i++) {
-               list_for_each(iter, queue) {
-                       lock = list_entry(iter, struct dlm_lock, list);
+               list_for_each_entry(lock, queue, list) {
                        if (lock->ml.cookie == unlock->cookie &&
                            lock->ml.node == unlock->node_idx) {
                                dlm_lock_get(lock);