diff options
author | Akinobu Mita <mita@miraclelinux.com> | 2006-06-26 03:24:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 12:58:18 -0400 |
commit | f116629d03655adaf7832b93b03c99391d09d4a7 (patch) | |
tree | 526f689619817df3c23ab00e3228b4776bde2190 /fs/ocfs2/dlm/dlmrecovery.c | |
parent | 179e09172ab663b8587ecc46bb18a56a770304a9 (diff) |
[PATCH] fs: use list_move()
This patch converts the combination of list_del(A) and list_add(A, B) to
list_move(A, B) under fs/.
Cc: Ian Kent <raven@themaw.net>
Acked-by: Joel Becker <joel.becker@oracle.com>
Cc: Neil Brown <neilb@cse.unsw.edu.au>
Cc: Hans Reiser <reiserfs-dev@namesys.com>
Cc: Urban Widmark <urban@teststation.com>
Acked-by: David Howells <dhowells@redhat.com>
Acked-by: Mark Fasheh <mark.fasheh@oracle.com>
Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/ocfs2/dlm/dlmrecovery.c')
-rw-r--r-- | fs/ocfs2/dlm/dlmrecovery.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c index 805cbabac051..9962190e7416 100644 --- a/fs/ocfs2/dlm/dlmrecovery.c +++ b/fs/ocfs2/dlm/dlmrecovery.c | |||
@@ -905,13 +905,11 @@ static void dlm_move_reco_locks_to_list(struct dlm_ctxt *dlm, | |||
905 | mlog(0, "found lockres owned by dead node while " | 905 | mlog(0, "found lockres owned by dead node while " |
906 | "doing recovery for node %u. sending it.\n", | 906 | "doing recovery for node %u. sending it.\n", |
907 | dead_node); | 907 | dead_node); |
908 | list_del_init(&res->recovering); | 908 | list_move_tail(&res->recovering, list); |
909 | list_add_tail(&res->recovering, list); | ||
910 | } else if (res->owner == DLM_LOCK_RES_OWNER_UNKNOWN) { | 909 | } else if (res->owner == DLM_LOCK_RES_OWNER_UNKNOWN) { |
911 | mlog(0, "found UNKNOWN owner while doing recovery " | 910 | mlog(0, "found UNKNOWN owner while doing recovery " |
912 | "for node %u. sending it.\n", dead_node); | 911 | "for node %u. sending it.\n", dead_node); |
913 | list_del_init(&res->recovering); | 912 | list_move_tail(&res->recovering, list); |
914 | list_add_tail(&res->recovering, list); | ||
915 | } | 913 | } |
916 | } | 914 | } |
917 | spin_unlock(&dlm->spinlock); | 915 | spin_unlock(&dlm->spinlock); |
@@ -1529,8 +1527,7 @@ static int dlm_process_recovery_data(struct dlm_ctxt *dlm, | |||
1529 | 1527 | ||
1530 | /* move the lock to its proper place */ | 1528 | /* move the lock to its proper place */ |
1531 | /* do not alter lock refcount. switching lists. */ | 1529 | /* do not alter lock refcount. switching lists. */ |
1532 | list_del_init(&lock->list); | 1530 | list_move_tail(&lock->list, queue); |
1533 | list_add_tail(&lock->list, queue); | ||
1534 | spin_unlock(&res->spinlock); | 1531 | spin_unlock(&res->spinlock); |
1535 | 1532 | ||
1536 | mlog(0, "just reordered a local lock!\n"); | 1533 | mlog(0, "just reordered a local lock!\n"); |