diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2016-03-29 13:02:23 -0700 |
---|---|---|
committer | Stefan Agner <stefan.agner@toradex.com> | 2016-03-29 13:02:23 -0700 |
commit | 1df133c0db64d633bbb9b238aa0e1588e2c5e7d6 (patch) | |
tree | c68d76907c523e81b5d0e8a924728f9e1aed1844 /fs/xfs/xfs_buf.c | |
parent | 2b7d39d1a28cb478627fc22fdc8dd77ed89ffe92 (diff) | |
parent | 62e21959dc6f25c5fce0c1a0934e4a9d982bf99b (diff) |
Merge tag 'v4.4.5' into toradex_vf_4.4-next
This is the 4.4.5 stable release
Diffstat (limited to 'fs/xfs/xfs_buf.c')
-rw-r--r-- | fs/xfs/xfs_buf.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index 3243cdf97f33..39090fc56f09 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c @@ -604,6 +604,13 @@ found: } } + /* + * Clear b_error if this is a lookup from a caller that doesn't expect + * valid data to be found in the buffer. + */ + if (!(flags & XBF_READ)) + xfs_buf_ioerror(bp, 0); + XFS_STATS_INC(target->bt_mount, xb_get); trace_xfs_buf_get(bp, flags, _RET_IP_); return bp; @@ -1520,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, |