diff options
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap/linus/0037-Revert-Staging-zram-work-around-oops-due-to-startup-.patch')
-rw-r--r-- | extras/recipes-kernel/linux/linux-omap/linus/0037-Revert-Staging-zram-work-around-oops-due-to-startup-.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0037-Revert-Staging-zram-work-around-oops-due-to-startup-.patch b/extras/recipes-kernel/linux/linux-omap/linus/0037-Revert-Staging-zram-work-around-oops-due-to-startup-.patch new file mode 100644 index 00000000..03e390eb --- /dev/null +++ b/extras/recipes-kernel/linux/linux-omap/linus/0037-Revert-Staging-zram-work-around-oops-due-to-startup-.patch | |||
@@ -0,0 +1,54 @@ | |||
1 | From 9214e9d423fea726c5497ae5be07d3069246e6bd Mon Sep 17 00:00:00 2001 | ||
2 | From: Nitin Gupta <ngupta@vflare.org> | ||
3 | Date: Thu, 30 Dec 2010 04:07:58 -0500 | ||
4 | Subject: [PATCH 37/65] Revert "Staging: zram: work around oops due to startup ordering snafu" | ||
5 | |||
6 | This reverts commit 7e24cce38a99f373450db67bf576fe73e8168d66 because it | ||
7 | was never appropriate for mainline. | ||
8 | |||
9 | Do not check for init flag before starting I/O - zram module is unusable | ||
10 | without this fix. | ||
11 | |||
12 | The oops mentioned in the reverted commit message was actually a problem | ||
13 | only with the zram version as present in project's own repository where | ||
14 | we allocate struct zram_stats_cpu upon device initialization. OTOH, In | ||
15 | mainline/staging version of zram, we allocate struct stats upfront, so | ||
16 | this oops cannot happen in mainline version. | ||
17 | |||
18 | Checking for init_done flag in zram_make_request() results in a *no-op* | ||
19 | for any I/O operation since we simply always return success. This flag | ||
20 | is actually set when the first write occurs on a zram disk which | ||
21 | triggers its initialization. | ||
22 | |||
23 | Bug report: https://bugzilla.kernel.org/show_bug.cgi?id=25722 | ||
24 | |||
25 | Reported-by: Dennis Jansen <dennis.jansen@web.de> | ||
26 | Signed-off-by: Nitin Gupta <ngupta@vflare.org> | ||
27 | Cc: Anton Blanchard <anton@samba.org> | ||
28 | Cc: Andrew Morton <akpm@linux-foundation.org> | ||
29 | Cc: Greg Kroah-Hartman <gregkh@suse.de> | ||
30 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ||
31 | --- | ||
32 | drivers/staging/zram/zram_drv.c | 6 ------ | ||
33 | 1 files changed, 0 insertions(+), 6 deletions(-) | ||
34 | |||
35 | diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c | ||
36 | index 8c3c057..d0e9e02 100644 | ||
37 | --- a/drivers/staging/zram/zram_drv.c | ||
38 | +++ b/drivers/staging/zram/zram_drv.c | ||
39 | @@ -435,12 +435,6 @@ static int zram_make_request(struct request_queue *queue, struct bio *bio) | ||
40 | int ret = 0; | ||
41 | struct zram *zram = queue->queuedata; | ||
42 | |||
43 | - if (unlikely(!zram->init_done)) { | ||
44 | - set_bit(BIO_UPTODATE, &bio->bi_flags); | ||
45 | - bio_endio(bio, 0); | ||
46 | - return 0; | ||
47 | - } | ||
48 | - | ||
49 | if (!valid_io_request(zram, bio)) { | ||
50 | zram_stat64_inc(zram, &zram->stats.invalid_io); | ||
51 | bio_io_error(bio); | ||
52 | -- | ||
53 | 1.6.6.1 | ||
54 | |||