Merge branch 'xfs-4.8-buf-fixes' into for-next
authorDave Chinner <david@fromorbit.com>
Wed, 20 Jul 2016 01:53:35 +0000 (11:53 +1000)
committerDave Chinner <david@fromorbit.com>
Wed, 20 Jul 2016 01:53:35 +0000 (11:53 +1000)
1  2 
fs/xfs/xfs_buf.c
fs/xfs/xfs_buf_item.c
fs/xfs/xfs_log.c

index 4665ff6e5153423da5def7a7e623ecee2d81cdf0,2722cb495ef48b06a8591449cd97ff72ea191bc7..32fc5401a7563dcc805c620fcaa413e388daed02
@@@ -1825,21 -1892,25 +1909,21 @@@ xfs_buf_delwri_submit_buffers
                        continue;
                }
  
 -              list_move_tail(&bp->b_list, io_list);
                trace_xfs_buf_delwri_split(bp, _RET_IP_);
 -      }
 -
 -      list_sort(NULL, io_list, xfs_buf_cmp);
 -
 -      blk_start_plug(&plug);
 -      list_for_each_entry_safe(bp, n, io_list, b_list) {
 -              bp->b_flags &= ~(_XBF_DELWRI_Q | XBF_WRITE_FAIL);
 -              bp->b_flags |= XBF_WRITE | XBF_ASYNC;
  
                /*
 -               * we do all Io submission async. This means if we need to wait
 -               * for IO completion we need to take an extra reference so the
 -               * buffer is still valid on the other side.
 +               * We do all IO submission async. This means if we need
 +               * to wait for IO completion we need to take an extra
 +               * reference so the buffer is still valid on the other
 +               * side. We need to move the buffer onto the io_list
 +               * at this point so the caller can still access it.
                 */
-               bp->b_flags &= ~(_XBF_DELWRI_Q | XBF_ASYNC | XBF_WRITE_FAIL);
 -              if (wait)
++              bp->b_flags &= ~(_XBF_DELWRI_Q | XBF_WRITE_FAIL);
 +              bp->b_flags |= XBF_WRITE | XBF_ASYNC;
 +              if (wait_list) {
                        xfs_buf_hold(bp);
 -              else
 +                      list_move_tail(&bp->b_list, wait_list);
 +              } else
                        list_del_init(&bp->b_list);
  
                xfs_buf_submit(bp);
Simple merge
Simple merge