Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 320940
b: refs/heads/master
c: 2a7d555
h: refs/heads/master
v: v3
  • Loading branch information
Shaohua Li authored and Jens Axboe committed Jul 31, 2012
1 parent 1a48e56 commit 85c2491
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 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: 9cbb17508808f8a6bdd83354b61e126ac4fa6fed
refs/heads/master: 2a7d5559b346574057dce4672d1ed9aaa9d1e685
15 changes: 7 additions & 8 deletions trunk/block/blk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2913,17 +2913,16 @@ static void flush_plug_callbacks(struct blk_plug *plug)
{
LIST_HEAD(callbacks);

if (list_empty(&plug->cb_list))
return;

list_splice_init(&plug->cb_list, &callbacks);
while (!list_empty(&plug->cb_list)) {
list_splice_init(&plug->cb_list, &callbacks);

while (!list_empty(&callbacks)) {
struct blk_plug_cb *cb = list_first_entry(&callbacks,
while (!list_empty(&callbacks)) {
struct blk_plug_cb *cb = list_first_entry(&callbacks,
struct blk_plug_cb,
list);
list_del(&cb->list);
cb->callback(cb);
list_del(&cb->list);
cb->callback(cb);
}
}
}

Expand Down

0 comments on commit 85c2491

Please sign in to comment.