diff options
Diffstat (limited to 'fs/buffer.c')
-rw-r--r-- | fs/buffer.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index 42534f67d71b..2e6b1a387b7e 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -743,8 +743,10 @@ static int fsync_buffers_list(spinlock_t *lock, struct list_head *list) | |||
743 | struct list_head tmp; | 743 | struct list_head tmp; |
744 | struct address_space *mapping; | 744 | struct address_space *mapping; |
745 | int err = 0, err2; | 745 | int err = 0, err2; |
746 | struct blk_plug plug; | ||
746 | 747 | ||
747 | INIT_LIST_HEAD(&tmp); | 748 | INIT_LIST_HEAD(&tmp); |
749 | blk_start_plug(&plug); | ||
748 | 750 | ||
749 | spin_lock(lock); | 751 | spin_lock(lock); |
750 | while (!list_empty(list)) { | 752 | while (!list_empty(list)) { |
@@ -781,6 +783,10 @@ static int fsync_buffers_list(spinlock_t *lock, struct list_head *list) | |||
781 | } | 783 | } |
782 | } | 784 | } |
783 | 785 | ||
786 | spin_unlock(lock); | ||
787 | blk_finish_plug(&plug); | ||
788 | spin_lock(lock); | ||
789 | |||
784 | while (!list_empty(&tmp)) { | 790 | while (!list_empty(&tmp)) { |
785 | bh = BH_ENTRY(tmp.prev); | 791 | bh = BH_ENTRY(tmp.prev); |
786 | get_bh(bh); | 792 | get_bh(bh); |