zram: do not pass rw argument to __zram_make_request()
authorSergey Senozhatsky <sergey.senozhatsky@gmail.com>
Mon, 7 Apr 2014 22:38:01 +0000 (15:38 -0700)
committerAlex Shi <alex.shi@linaro.org>
Mon, 11 May 2015 12:40:32 +0000 (20:40 +0800)
commit18bebabb7ecc3c03e3339d825141908814a4cf59
tree86cdf32319aadfeff9a7bdf053bc5f0b9041cbbf
parentfafe199bf14378d4a0a309d15bba16ce6742bd19
zram: do not pass rw argument to __zram_make_request()

Do not pass rw argument down the __zram_make_request() -> zram_bvec_rw()
chain, decode it in zram_bvec_rw() instead.  Besides, this is the place
where we distinguish READ and WRITE bio data directions, so account zram
RW stats here, instead of __zram_make_request().  This also allows to
account a real number of zram READ/WRITE operations, not just requests
(single RW request may cause a number of zram RW ops with separate
locking, compression/decompression, etc).

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Acked-by: Jerome Marchand <jmarchan@redhat.com>
Cc: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit be257c61306750d11c20d2ac567bf63304c696a3)
Signed-off-by: Alex Shi <alex.shi@linaro.org>
 Conflicts:
drivers/block/zram/zram_drv.c

 Conflicts solution:
keep bio struct as old before commit 4f024f3797
'block: Abstract out bvec iterator'
drivers/block/zram/zram_drv.c