[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gluster-devel] [PATCH 2/2] features/locks: Fix insert_and_merge
From: |
Anand Avati |
Subject: |
Re: [Gluster-devel] [PATCH 2/2] features/locks: Fix insert_and_merge |
Date: |
Fri, 9 Oct 2009 18:12:51 +0530 |
> I just checked the modified patch: INIT_LIST_HEAD *is* necessary.
> subtract_locks() do a memcpy of the lock, so it copy list pointers,
> but the new lock *is not* in the list.
> So INIT_LIST_HEAD() must be called to initialize the list structure.
> Else, this will just segfault (At least it did with my testcase).
Where exactly did it segfault for you? The list head is never iterated
over, and only list_add_tail'ed (which does not look at the stale
pointers). Though INIT_LIST_HEAD'ing is a good practice, I'm curious
to know where it segfaulted.
Avati