RE: [PATCH] mm/mmap.c: Remove redundant vma looping

From: Chen Gang
Date: Mon Oct 05 2015 - 08:23:57 EST


> From: aarcange@xxxxxxxxxx
>
> Hello Chen,
>
> On Sun, Oct 04, 2015 at 12:55:29PM +0800, Chen Gang wrote:
>> Theoretically, the lock and unlock need to be symmetric, if we have to
>> lock f_mapping all firstly, then lock all anon_vma, probably, we also
>> need to unlock anon_vma all, then unlock all f_mapping.
>
> They don't need to be symmetric because the unlocking order doesn't
> matter. To avoid lock inversion deadlocks it is enough to enforce the
> lock order.

OK, thanks. I shall continue to find another patches. :-)

--
Chen Gang

Open, share, and attitude like air, water, and life which God blessed
N?叉??y??b??千v??藓{.n???{?赙zXФ?塄}?财??j:+v???赙zZ+€?zf"?????i????ア??璀??撷f?^j谦y??@A?囤?0鹅h??i