summaryrefslogtreecommitdiffstats
path: root/extras/recipes-kernel/linux/linux-omap/linus/0037-Revert-Staging-zram-work-around-oops-due-to-startup-.patch
diff options
context:
space:
mode:
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-.patch54
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 @@
1From 9214e9d423fea726c5497ae5be07d3069246e6bd Mon Sep 17 00:00:00 2001
2From: Nitin Gupta <ngupta@vflare.org>
3Date: Thu, 30 Dec 2010 04:07:58 -0500
4Subject: [PATCH 37/65] Revert "Staging: zram: work around oops due to startup ordering snafu"
5
6This reverts commit 7e24cce38a99f373450db67bf576fe73e8168d66 because it
7was never appropriate for mainline.
8
9Do not check for init flag before starting I/O - zram module is unusable
10without this fix.
11
12The oops mentioned in the reverted commit message was actually a problem
13only with the zram version as present in project's own repository where
14we allocate struct zram_stats_cpu upon device initialization. OTOH, In
15mainline/staging version of zram, we allocate struct stats upfront, so
16this oops cannot happen in mainline version.
17
18Checking for init_done flag in zram_make_request() results in a *no-op*
19for any I/O operation since we simply always return success. This flag
20is actually set when the first write occurs on a zram disk which
21triggers its initialization.
22
23Bug report: https://bugzilla.kernel.org/show_bug.cgi?id=25722
24
25Reported-by: Dennis Jansen <dennis.jansen@web.de>
26Signed-off-by: Nitin Gupta <ngupta@vflare.org>
27Cc: Anton Blanchard <anton@samba.org>
28Cc: Andrew Morton <akpm@linux-foundation.org>
29Cc: Greg Kroah-Hartman <gregkh@suse.de>
30Signed-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
35diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c
36index 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--
531.6.6.1
54