]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
zram: delay pending free request in read path
authorMinchan Kim <minchan@kernel.org>
Wed, 15 Jan 2014 05:56:11 +0000 (16:56 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 16 Jan 2014 05:54:04 +0000 (16:54 +1100)
commit4a4a3699948bfb33fb23c20f1a6d806d33088502
treeb8cf493b96f26ab1ca74caa34fe08bcc068403ec
parentf6929e98b60fd6625f92276f1fd2d4f9eb41d811
zram: delay pending free request in read path

Sergey reported we don't need to handle pending free request every I/O so
that this patch removes it in read path while we remain it in write path.

Let's consider below example.

Swap subsystem ask to zram "A" block free by swap_slot_free_notify but
zram had been pended it without real freeing.  Swap subsystem allocates
"A" block for new data but request pended for a long time just handled and
zram blindly free new data on the "A" block.  :(

That's why we couldn't remove handle pending free request right before
zram-write.

Signed-off-by: Minchan Kim <minchan@kernel.org>
Reported-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Tested-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Nitin Gupta <ngupta@vflare.org>
Cc: Jerome Marchand <jmarchan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/block/zram/zram_drv.c