Skip to content

Commit

Permalink
Merge branch 'xfs-misc-fixes-for-4.5-3' into for-next
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Chinner committed Jan 18, 2016
2 parents 4c931f7 + 85bec54 commit ee3804d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 10 additions & 0 deletions fs/xfs/xfs_buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1527,6 +1527,16 @@ xfs_wait_buftarg(
LIST_HEAD(dispose);
int loop = 0;

/*
* We need to flush the buffer workqueue to ensure that all IO
* completion processing is 100% done. Just waiting on buffer locks is
* not sufficient for async IO as the reference count held over IO is
* not released until after the buffer lock is dropped. Hence we need to
* ensure here that all reference counts have been dropped before we
* start walking the LRU list.
*/
drain_workqueue(btp->bt_mount->m_buf_workqueue);

/* loop until there is nothing left on the lru list. */
while (list_lru_count(&btp->bt_lru)) {
list_lru_walk(&btp->bt_lru, xfs_buftarg_wait_rele,
Expand Down
1 change: 0 additions & 1 deletion fs/xfs/xfs_trans_ail.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,6 @@ xfsaild(
long tout = 0; /* milliseconds */

current->flags |= PF_MEMALLOC;
set_freezable();

while (!kthread_should_stop()) {
if (tout && tout <= 20)
Expand Down

0 comments on commit ee3804d

Please sign in to comment.