[PATCH] fs: prevent hang on suspend/resume when MMC/SD card presen=
From: Matt Reimer
Date: Thu May 13 2010 - 17:36:54 EST
Devices can come and go from the MMC/SD bus during suspend or resume,
when the writeback thread is frozen, resulting in a hang. So thaw the
writeback thread in del_gendisk() to prevent the hang.
Signed-off-by: Matt Reimer <mreimer@xxxxxxxxxxxxxx>
---
fs/partitions/check.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/fs/partitions/check.c b/fs/partitions/check.c
index e238ab2..b303919 100644
--- a/fs/partitions/check.c
+++ b/fs/partitions/check.c
@@ -666,6 +666,8 @@ void del_gendisk(struct gendisk *disk)
struct disk_part_iter piter;
struct hd_struct *part;
+ thaw_process(disk->queue->backing_dev_info.wb.task);
+
/* invalidate stuff */
disk_part_iter_init(&piter, disk,
DISK_PITER_INCL_EMPTY | DISK_PITER_REVERSE);
--=20
1.7.0.4
--000e0cd71a5aa15216048680a9a7
Content-Type: application/octet-stream;
name="0001-fs-prevent-hang-on-suspend-resume-when-MMC-SD-card-p.patch"
Content-Disposition: attachment;
filename="0001-fs-prevent-hang-on-suspend-resume-when-MMC-SD-card-p.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_g963w7d00
RnJvbSAyMGQ4MzQwNDcxZWIwNWFhNTRhZjEzNDlmNGRkY2NlY2Q5YzIzMGM2IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBNYXR0IFJlaW1lciA8bXJlaW1lckBzZGdzeXN0ZW1zLmNvbT4K
RGF0ZTogVGh1LCAxMyBNYXkgMjAxMCAxNDozNjo1NCAtMDcwMApTdWJqZWN0OiBbUEFUQ0hdIGZz
OiBwcmV2ZW50IGhhbmcgb24gc3VzcGVuZC9yZXN1bWUgd2hlbiBNTUMvU0QgY2FyZCBwcmVzZW50
CgpEZXZpY2VzIGNhbiBjb21lIGFuZCBnbyBmcm9tIHRoZSBNTUMvU0QgYnVzIGR1cmluZyBzdXNw
ZW5kIG9yIHJlc3VtZSwKd2hlbiB0aGUgd3JpdGViYWNrIHRocmVhZCBpcyBmcm96ZW4sIHJlc3Vs
dGluZyBpbiBhIGhhbmcuIFNvIHRoYXcgdGhlCndyaXRlYmFjayB0aHJlYWQgaW4gZGVsX2dlbmRp
c2soKSB0byBwcmV2ZW50IHRoZSBoYW5nLgoKU2lnbmVkLW9mZi1ieTogTWF0dCBSZWltZXIgPG1y
ZWltZXJAc2Rnc3lzdGVtcy5jb20+Ci0tLQogZnMvcGFydGl0aW9ucy9jaGVjay5jIHwgICAgMiAr
KwogMSBmaWxlcyBjaGFuZ2VkLCAyIGluc2VydGlvbnMoKyksIDAgZGVsZXRpb25zKC0pCgpkaWZm
IC0tZ2l0IGEvZnMvcGFydGl0aW9ucy9jaGVjay5jIGIvZnMvcGFydGl0aW9ucy9jaGVjay5jCmlu
ZGV4IGUyMzhhYjIuLmIzMDM5MTkgMTAwNjQ0Ci0tLSBhL2ZzL3BhcnRpdGlvbnMvY2hlY2suYwor
KysgYi9mcy9wYXJ0aXRpb25zL2NoZWNrLmMKQEAgLTY2Niw2ICs2NjYsOCBAQCB2b2lkIGRlbF9n
ZW5kaXNrKHN0cnVjdCBnZW5kaXNrICpkaXNrKQogCXN0cnVjdCBkaXNrX3BhcnRfaXRlciBwaXRl
cjsKIAlzdHJ1Y3QgaGRfc3RydWN0ICpwYXJ0OwogCisJdGhhd19wcm9jZXNzKGRpc2stPnF1ZXVl
LT5iYWNraW5nX2Rldl9pbmZvLndiLnRhc2spOworCiAJLyogaW52YWxpZGF0ZSBzdHVmZiAqLwog
CWRpc2tfcGFydF9pdGVyX2luaXQoJnBpdGVyLCBkaXNrLAogCQkJICAgICBESVNLX1BJVEVSX0lO
Q0xfRU1QVFkgfCBESVNLX1BJVEVSX1JFVkVSU0UpOwotLSAKMS43LjAuNAoK
--000e0cd71a5aa15216048680a9a7--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/