Re: [PATCH 2/9] mm: khugepaged: fix radix tree node leak in shmem collapse error path

2016-11-17 Thread Jan Kara
On Thu 17-11-16 14:11:31, Johannes Weiner wrote: > The radix tree counts valid entries in each tree node. Entries stored > in the tree cannot be removed by simpling storing NULL in the slot or > the internal counters will be off and the node never gets freed again. > > When collapsing a shmem page

Re: [PATCH 2/9] mm: khugepaged: fix radix tree node leak in shmem collapse error path

2016-11-17 Thread Kirill A. Shutemov
On Thu, Nov 17, 2016 at 02:11:31PM -0500, Johannes Weiner wrote: > The radix tree counts valid entries in each tree node. Entries stored > in the tree cannot be removed by simpling storing NULL in the slot or > the internal counters will be off and the node never gets freed again. > > When collaps

[PATCH 2/9] mm: khugepaged: fix radix tree node leak in shmem collapse error path

2016-11-17 Thread Johannes Weiner
The radix tree counts valid entries in each tree node. Entries stored in the tree cannot be removed by simpling storing NULL in the slot or the internal counters will be off and the node never gets freed again. When collapsing a shmem page fails, restore the holes that were filled with radix_tree_