xfs: prevent dropping ioend completions during buftarg wait
[firefly-linux-kernel-4.4.55.git] / fs / xfs / xfs_buf.c
index 39090fc56f0943dddffc4faa12c810ceb7d25c58..eb1b8c8acfcbe25c8f11ee7b36f2d0ed5f9f0558 100644 (file)
@@ -1535,7 +1535,7 @@ xfs_wait_buftarg(
         * ensure here that all reference counts have been dropped before we
         * start walking the LRU list.
         */
-       drain_workqueue(btp->bt_mount->m_buf_workqueue);
+       flush_workqueue(btp->bt_mount->m_buf_workqueue);
 
        /* loop until there is nothing left on the lru list. */
        while (list_lru_count(&btp->bt_lru)) {