aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@sandeen.net>2016-07-19 20:53:22 -0400
committerDave Chinner <david@fromorbit.com>2016-07-19 20:53:22 -0400
commit0b4db5dff3599b46957bfd8a4c66945c915e26d3 (patch)
tree879b457f05e511e302fb138b7e8782fdfcc73aaf
parente97f6c545f963abd7de56a58a29ba73a9edee015 (diff)
xfs: remove extraneous buffer flag changes
Fix up a couple places where extra flag manipulation occurs. In the first case we clear XBF_ASYNC and then immediately reset it - so don't bother clearing in the first place. In the 2nd case we are at a point in the function where the buffer must already be async, so there is no need to reset it. Add consistent spacing around the " | " while we're at it. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
-rw-r--r--fs/xfs/xfs_buf.c2
-rw-r--r--fs/xfs/xfs_buf_item.c5
2 files changed, 3 insertions, 4 deletions
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index e71cfbd5acb3..5d52e44b89f7 100644
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
@@ -1816,7 +1816,7 @@ __xfs_buf_delwri_submit(
1816 1816
1817 blk_start_plug(&plug); 1817 blk_start_plug(&plug);
1818 list_for_each_entry_safe(bp, n, io_list, b_list) { 1818 list_for_each_entry_safe(bp, n, io_list, b_list) {
1819 bp->b_flags &= ~(_XBF_DELWRI_Q | XBF_ASYNC | XBF_WRITE_FAIL); 1819 bp->b_flags &= ~(_XBF_DELWRI_Q | XBF_WRITE_FAIL);
1820 bp->b_flags |= XBF_WRITE | XBF_ASYNC; 1820 bp->b_flags |= XBF_WRITE | XBF_ASYNC;
1821 1821
1822 /* 1822 /*
diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c
index 34257992934c..6a2f429391cc 100644
--- a/fs/xfs/xfs_buf_item.c
+++ b/fs/xfs/xfs_buf_item.c
@@ -1080,10 +1080,9 @@ xfs_buf_iodone_callback_error(
1080 * async write failure at least once, but we also need to set the buffer 1080 * async write failure at least once, but we also need to set the buffer
1081 * up to behave correctly now for repeated failures. 1081 * up to behave correctly now for repeated failures.
1082 */ 1082 */
1083 if (!(bp->b_flags & (XBF_STALE|XBF_WRITE_FAIL)) || 1083 if (!(bp->b_flags & (XBF_STALE | XBF_WRITE_FAIL)) ||
1084 bp->b_last_error != bp->b_error) { 1084 bp->b_last_error != bp->b_error) {
1085 bp->b_flags |= (XBF_WRITE | XBF_ASYNC | 1085 bp->b_flags |= (XBF_WRITE | XBF_DONE | XBF_WRITE_FAIL);
1086 XBF_DONE | XBF_WRITE_FAIL);
1087 bp->b_last_error = bp->b_error; 1086 bp->b_last_error = bp->b_error;
1088 bp->b_retries = 0; 1087 bp->b_retries = 0;
1089 bp->b_first_retry_time = jiffies; 1088 bp->b_first_retry_time = jiffies;