+ zram-correct-offset-usage-in-zram_bio_discard.patch added to -mm tree
Subsystems (2)
Subject: + zram-correct-offset-usage-in-zram_bio_discard.patch added to -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Tue, 22 Apr 2014 12:57:02 -0700
The patch titled
Subject: zram: correct offset usage in zram_bio_discard
has been added to the -mm tree. Its filename is
zram-correct-offset-usage-in-zram_bio_discard.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/zram-correct-offset-usage-in-zram_bio_discard.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/zram-correct-offset-usage-in-zram_bio_discard.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated there every 3-4 working days
------------------------------------------------------
From: Weijie Yang <[email protected]>
Subject: zram: correct offset usage in zram_bio_discard
We want to skip the logical block which is partially covered by the discard bio, so check the remaining size and subtract it if there is a need to goto the next logical block.
This patch corrects the offset usage in zram_bio_discard.
---
drivers/block/zram/zram_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/block/zram/zram_drv.c renamed from drivers/block/zram/zram_drv.c~zram-correct-offset-usage-in-zram_bio_discard +2 -2
@@ -572,10 +572,10 @@ static void zram_bio_discard(struct zram* skipping this logical block is appropriate here. */ if (offset) { -if (n < offset) +if (n <= (PAGE_SIZE - offset))return ; - n -= offset; + n -= (PAGE_SIZE - offset); index++; }
_
Patches currently in -mm which might be from [email protected] are
zram-correct-offset-usage-in-zram_bio_discard.patch