diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-11-30 16:57:03 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-11-30 16:57:03 -0500 |
| commit | b54eb1795c0cfeb6cc48fdcbd010e800541750ad (patch) | |
| tree | 85ac272cfee48497ecaaf121b74db5a6bd021cf3 | |
| parent | 0bb324626575e89385ca384d8cdd98fbeaeb0545 (diff) | |
| parent | 69ac74822277fa999a3f469d8362e93262deb3f4 (diff) | |
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
cciss: make device attrs static
Thaw refrigerated bdi flusher threads before invoking kthread_stop on them
| -rw-r--r-- | drivers/block/cciss.c | 16 | ||||
| -rw-r--r-- | mm/backing-dev.c | 8 |
2 files changed, 14 insertions, 10 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 6399e5090df4..92b126394fa1 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c | |||
| @@ -482,7 +482,7 @@ static ssize_t host_store_rescan(struct device *dev, | |||
| 482 | 482 | ||
| 483 | return count; | 483 | return count; |
| 484 | } | 484 | } |
| 485 | DEVICE_ATTR(rescan, S_IWUSR, NULL, host_store_rescan); | 485 | static DEVICE_ATTR(rescan, S_IWUSR, NULL, host_store_rescan); |
| 486 | 486 | ||
| 487 | static ssize_t dev_show_unique_id(struct device *dev, | 487 | static ssize_t dev_show_unique_id(struct device *dev, |
| 488 | struct device_attribute *attr, | 488 | struct device_attribute *attr, |
| @@ -512,7 +512,7 @@ static ssize_t dev_show_unique_id(struct device *dev, | |||
| 512 | sn[8], sn[9], sn[10], sn[11], | 512 | sn[8], sn[9], sn[10], sn[11], |
| 513 | sn[12], sn[13], sn[14], sn[15]); | 513 | sn[12], sn[13], sn[14], sn[15]); |
| 514 | } | 514 | } |
| 515 | DEVICE_ATTR(unique_id, S_IRUGO, dev_show_unique_id, NULL); | 515 | static DEVICE_ATTR(unique_id, S_IRUGO, dev_show_unique_id, NULL); |
| 516 | 516 | ||
| 517 | static ssize_t dev_show_vendor(struct device *dev, | 517 | static ssize_t dev_show_vendor(struct device *dev, |
| 518 | struct device_attribute *attr, | 518 | struct device_attribute *attr, |
| @@ -536,7 +536,7 @@ static ssize_t dev_show_vendor(struct device *dev, | |||
| 536 | else | 536 | else |
| 537 | return snprintf(buf, sizeof(vendor) + 1, "%s\n", drv->vendor); | 537 | return snprintf(buf, sizeof(vendor) + 1, "%s\n", drv->vendor); |
| 538 | } | 538 | } |
| 539 | DEVICE_ATTR(vendor, S_IRUGO, dev_show_vendor, NULL); | 539 | static DEVICE_ATTR(vendor, S_IRUGO, dev_show_vendor, NULL); |
| 540 | 540 | ||
| 541 | static ssize_t dev_show_model(struct device *dev, | 541 | static ssize_t dev_show_model(struct device *dev, |
| 542 | struct device_attribute *attr, | 542 | struct device_attribute *attr, |
| @@ -560,7 +560,7 @@ static ssize_t dev_show_model(struct device *dev, | |||
| 560 | else | 560 | else |
| 561 | return snprintf(buf, sizeof(model) + 1, "%s\n", drv->model); | 561 | return snprintf(buf, sizeof(model) + 1, "%s\n", drv->model); |
| 562 | } | 562 | } |
| 563 | DEVICE_ATTR(model, S_IRUGO, dev_show_model, NULL); | 563 | static DEVICE_ATTR(model, S_IRUGO, dev_show_model, NULL); |
| 564 | 564 | ||
| 565 | static ssize_t dev_show_rev(struct device *dev, | 565 | static ssize_t dev_show_rev(struct device *dev, |
| 566 | struct device_attribute *attr, | 566 | struct device_attribute *attr, |
| @@ -584,7 +584,7 @@ static ssize_t dev_show_rev(struct device *dev, | |||
| 584 | else | 584 | else |
| 585 | return snprintf(buf, sizeof(rev) + 1, "%s\n", drv->rev); | 585 | return snprintf(buf, sizeof(rev) + 1, "%s\n", drv->rev); |
| 586 | } | 586 | } |
| 587 | DEVICE_ATTR(rev, S_IRUGO, dev_show_rev, NULL); | 587 | static DEVICE_ATTR(rev, S_IRUGO, dev_show_rev, NULL); |
| 588 | 588 | ||
| 589 | static ssize_t cciss_show_lunid(struct device *dev, | 589 | static ssize_t cciss_show_lunid(struct device *dev, |
| 590 | struct device_attribute *attr, char *buf) | 590 | struct device_attribute *attr, char *buf) |
| @@ -609,7 +609,7 @@ static ssize_t cciss_show_lunid(struct device *dev, | |||
| 609 | lunid[0], lunid[1], lunid[2], lunid[3], | 609 | lunid[0], lunid[1], lunid[2], lunid[3], |
| 610 | lunid[4], lunid[5], lunid[6], lunid[7]); | 610 | lunid[4], lunid[5], lunid[6], lunid[7]); |
| 611 | } | 611 | } |
| 612 | DEVICE_ATTR(lunid, S_IRUGO, cciss_show_lunid, NULL); | 612 | static DEVICE_ATTR(lunid, S_IRUGO, cciss_show_lunid, NULL); |
| 613 | 613 | ||
| 614 | static ssize_t cciss_show_raid_level(struct device *dev, | 614 | static ssize_t cciss_show_raid_level(struct device *dev, |
| 615 | struct device_attribute *attr, char *buf) | 615 | struct device_attribute *attr, char *buf) |
| @@ -632,7 +632,7 @@ static ssize_t cciss_show_raid_level(struct device *dev, | |||
| 632 | return snprintf(buf, strlen(raid_label[raid]) + 7, "RAID %s\n", | 632 | return snprintf(buf, strlen(raid_label[raid]) + 7, "RAID %s\n", |
| 633 | raid_label[raid]); | 633 | raid_label[raid]); |
| 634 | } | 634 | } |
| 635 | DEVICE_ATTR(raid_level, S_IRUGO, cciss_show_raid_level, NULL); | 635 | static DEVICE_ATTR(raid_level, S_IRUGO, cciss_show_raid_level, NULL); |
| 636 | 636 | ||
| 637 | static ssize_t cciss_show_usage_count(struct device *dev, | 637 | static ssize_t cciss_show_usage_count(struct device *dev, |
| 638 | struct device_attribute *attr, char *buf) | 638 | struct device_attribute *attr, char *buf) |
| @@ -651,7 +651,7 @@ static ssize_t cciss_show_usage_count(struct device *dev, | |||
| 651 | spin_unlock_irqrestore(CCISS_LOCK(h->ctlr), flags); | 651 | spin_unlock_irqrestore(CCISS_LOCK(h->ctlr), flags); |
| 652 | return snprintf(buf, 20, "%d\n", count); | 652 | return snprintf(buf, 20, "%d\n", count); |
| 653 | } | 653 | } |
| 654 | DEVICE_ATTR(usage_count, S_IRUGO, cciss_show_usage_count, NULL); | 654 | static DEVICE_ATTR(usage_count, S_IRUGO, cciss_show_usage_count, NULL); |
| 655 | 655 | ||
| 656 | static struct attribute *cciss_host_attrs[] = { | 656 | static struct attribute *cciss_host_attrs[] = { |
| 657 | &dev_attr_rescan.attr, | 657 | &dev_attr_rescan.attr, |
diff --git a/mm/backing-dev.c b/mm/backing-dev.c index 11aee09dd2a6..67a33a5a1a93 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c | |||
| @@ -604,10 +604,14 @@ static void bdi_wb_shutdown(struct backing_dev_info *bdi) | |||
| 604 | 604 | ||
| 605 | /* | 605 | /* |
| 606 | * Finally, kill the kernel threads. We don't need to be RCU | 606 | * Finally, kill the kernel threads. We don't need to be RCU |
| 607 | * safe anymore, since the bdi is gone from visibility. | 607 | * safe anymore, since the bdi is gone from visibility. Force |
| 608 | * unfreeze of the thread before calling kthread_stop(), otherwise | ||
| 609 | * it would never exet if it is currently stuck in the refrigerator. | ||
| 608 | */ | 610 | */ |
| 609 | list_for_each_entry(wb, &bdi->wb_list, list) | 611 | list_for_each_entry(wb, &bdi->wb_list, list) { |
| 612 | wb->task->flags &= ~PF_FROZEN; | ||
| 610 | kthread_stop(wb->task); | 613 | kthread_stop(wb->task); |
| 614 | } | ||
| 611 | } | 615 | } |
| 612 | 616 | ||
| 613 | /* | 617 | /* |
