]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/ocfs2/dlm/dlmlock.c
Merge branch 'for-3.13' into for-next
[karo-tx-linux.git] / fs / ocfs2 / dlm / dlmlock.c
index 47e67c2d228feff6259aa6d2a47b4b7c7b2ee103..5d32f7511f7423acc4f54b7665796eaf993bfe6b 100644 (file)
@@ -91,19 +91,14 @@ void dlm_destroy_lock_cache(void)
 static int dlm_can_grant_new_lock(struct dlm_lock_resource *res,
                                  struct dlm_lock *lock)
 {
-       struct list_head *iter;
        struct dlm_lock *tmplock;
 
-       list_for_each(iter, &res->granted) {
-               tmplock = list_entry(iter, struct dlm_lock, list);
-
+       list_for_each_entry(tmplock, &res->granted, list) {
                if (!dlm_lock_compatible(tmplock->ml.type, lock->ml.type))
                        return 0;
        }
 
-       list_for_each(iter, &res->converting) {
-               tmplock = list_entry(iter, struct dlm_lock, list);
-
+       list_for_each_entry(tmplock, &res->converting, list) {
                if (!dlm_lock_compatible(tmplock->ml.type, lock->ml.type))
                        return 0;
                if (!dlm_lock_compatible(tmplock->ml.convert_type,