aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2
diff options
context:
space:
mode:
authorXue jiufei <xuejiufei@huawei.com>2014-06-23 16:22:08 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-23 19:47:45 -0400
commita270c6d3c0d7ba914bd82da34152d1102920d805 (patch)
tree5834fdb2dc9ac617e1a872d5aca3631b42c9c9c8 /fs/ocfs2
parent8a8ad1c2f6ef6fbee7487ec293218f42e72ad6a3 (diff)
ocfs2/dlm: fix misuse of list_move_tail() in dlm_run_purge_list()
When a lockres in purge list but is still in use, it should be moved to the tail of purge list. dlm_thread will continue to check next lockres in purge list. However, code list_move_tail(&dlm->purge_list, &lockres->purge) will do *no* movements, so dlm_thread will purge the same lockres in this loop again and again. If it is in use for a long time, other lockres will not be processed. Signed-off-by: Yiwen Jiang <jiangyiwen@huawei.com> Signed-off-by: joyce.xue <xuejiufei@huawei.com> Reviewed-by: Mark Fasheh <mfasheh@suse.de> Cc: Joel Becker <jlbec@evilplan.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r--fs/ocfs2/dlm/dlmthread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ocfs2/dlm/dlmthread.c b/fs/ocfs2/dlm/dlmthread.c
index 9db869de829d..cf53a822f07f 100644
--- a/fs/ocfs2/dlm/dlmthread.c
+++ b/fs/ocfs2/dlm/dlmthread.c
@@ -264,7 +264,7 @@ static void dlm_run_purge_list(struct dlm_ctxt *dlm,
264 "used %d, state %d\n", dlm->name, 264 "used %d, state %d\n", dlm->name,
265 lockres->lockname.len, lockres->lockname.name, 265 lockres->lockname.len, lockres->lockname.name,
266 !unused, lockres->state); 266 !unused, lockres->state);
267 list_move_tail(&dlm->purge_list, &lockres->purge); 267 list_move_tail(&lockres->purge, &dlm->purge_list);
268 spin_unlock(&lockres->spinlock); 268 spin_unlock(&lockres->spinlock);
269 continue; 269 continue;
270 } 270 }