From: Xue jiufei <xuejiufei@huawei.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH] ocfs2/dlm: fix misuse of list_move_tail() in dlm_run_purge_list()
Date: Mon, 16 Jun 2014 09:20:49 +0800 [thread overview]
Message-ID: <539E4671.7000002@huawei.com> (raw)
In-Reply-To: <20140613211642.GI5484@wotan.suse.de>
On 2014/6/14 5:16, Mark Fasheh wrote:
> On Fri, Jun 13, 2014 at 03:26:29PM +0800, Xue jiufei wrote:
>> 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>
>> ---
>> fs/ocfs2/dlm/dlmthread.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/fs/ocfs2/dlm/dlmthread.c b/fs/ocfs2/dlm/dlmthread.c
>> index 9db869d..ce017de 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,
>> "used %d, state %d\n", dlm->name,
>> lockres->lockname.len, lockres->lockname.name,
>> !unused, lockres->state);
>> - list_move_tail(&dlm->purge_list, &lockres->purge);
>> + list_move_tail(&lockres->purge, dlm->purge_list);
>
> Erf, good catch!
>
> But this wants to be:
>
> list_move_tail(&lockres->purge, &dlm->purge_list);
> ^^^^
> Notice the extra '&'
>
> correct?
> --Mark
>
Yes, my mistake. I have already sent the version two.
Would you please review it? thank you.
> --
> Mark Fasheh
>
next prev parent reply other threads:[~2014-06-16 1:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-13 7:26 [Ocfs2-devel] [PATCH] ocfs2/dlm: fix misuse of list_move_tail() in dlm_run_purge_list() Xue jiufei
2014-06-13 21:16 ` Mark Fasheh
2014-06-16 1:20 ` Xue jiufei [this message]
2014-06-16 22:06 ` Mark Fasheh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=539E4671.7000002@huawei.com \
--to=xuejiufei@huawei.com \
--cc=ocfs2-devel@oss.oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.