]> git.karo-electronics.de Git - karo-tx-linux.git/commit
zswap: init under_reclaim
authorSeth Jennings <sjenning@linux.vnet.ibm.com>
Wed, 19 Jun 2013 00:07:00 +0000 (10:07 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Jun 2013 07:26:53 +0000 (17:26 +1000)
commitd14288049e3a886dc332237e7e3c204ba152d6bb
tree125f21e6fc1899a39f20ddbd53ff9704df35aafe
parentec567bc4009dca136e9dc16296db9e7c284aeea3
zswap: init under_reclaim

Bob Liu reported a memory leak in zswap.  This was due to the
under_reclaim field in the zbud header not being initialized
to 0, which resulted in zbud_free() not freeing the page
under the false assumption that the page was undergoing
zbud reclaim.

This patch properly initializes the under_reclaim field.

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Reported-by: Bob Liu <bob.liu@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/zbud.c