Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84559
b: refs/heads/master
c: afb2452
h: refs/heads/master
i:
  84557: fc39db4
  84555: 4871180
  84551: 2b47b89
  84543: d7c18b1
v: v3
  • Loading branch information
Paul Jimenez authored and Alasdair G Kergon committed Feb 8, 2008
1 parent 282f12c commit 38affc0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 76c072b48e39e9291fbf02d6c912cf27d65e093d
refs/heads/master: afb24528f9012e5c6361ca9a9128c7c089c1cc7c
16 changes: 7 additions & 9 deletions trunk/drivers/md/dm-table.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,8 @@ static void free_devices(struct list_head *devices)
{
struct list_head *tmp, *next;

for (tmp = devices->next; tmp != devices; tmp = next) {
list_for_each_safe(tmp, next, devices) {
struct dm_dev *dd = list_entry(tmp, struct dm_dev, list);
next = tmp->next;
kfree(dd);
}
}
Expand Down Expand Up @@ -993,12 +992,11 @@ int dm_table_resume_targets(struct dm_table *t)

int dm_table_any_congested(struct dm_table *t, int bdi_bits)
{
struct list_head *d, *devices;
struct dm_dev *dd;
struct list_head *devices = dm_table_get_devices(t);
int r = 0;

devices = dm_table_get_devices(t);
for (d = devices->next; d != devices; d = d->next) {
struct dm_dev *dd = list_entry(d, struct dm_dev, list);
list_for_each_entry(dd, devices, list) {
struct request_queue *q = bdev_get_queue(dd->bdev);
r |= bdi_congested(&q->backing_dev_info, bdi_bits);
}
Expand All @@ -1008,10 +1006,10 @@ int dm_table_any_congested(struct dm_table *t, int bdi_bits)

void dm_table_unplug_all(struct dm_table *t)
{
struct list_head *d, *devices = dm_table_get_devices(t);
struct dm_dev *dd;
struct list_head *devices = dm_table_get_devices(t);

for (d = devices->next; d != devices; d = d->next) {
struct dm_dev *dd = list_entry(d, struct dm_dev, list);
list_for_each_entry(dd, devices, list) {
struct request_queue *q = bdev_get_queue(dd->bdev);

blk_unplug(q);
Expand Down

0 comments on commit 38affc0

Please sign in to comment.