]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
xfs: remove extraneous buffer flag changes
authorEric Sandeen <sandeen@sandeen.net>
Wed, 20 Jul 2016 00:53:22 +0000 (10:53 +1000)
committerDave Chinner <david@fromorbit.com>
Wed, 20 Jul 2016 00:53:22 +0000 (10:53 +1000)
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>
fs/xfs/xfs_buf.c
fs/xfs/xfs_buf_item.c

index e71cfbd5acb3c74df23be024c91420a07291a493..5d52e44b89f795d8a0795f29f70fb82ade354e44 100644 (file)
@@ -1816,7 +1816,7 @@ __xfs_buf_delwri_submit(
 
        blk_start_plug(&plug);
        list_for_each_entry_safe(bp, n, io_list, b_list) {
-               bp->b_flags &= ~(_XBF_DELWRI_Q | XBF_ASYNC | XBF_WRITE_FAIL);
+               bp->b_flags &= ~(_XBF_DELWRI_Q | XBF_WRITE_FAIL);
                bp->b_flags |= XBF_WRITE | XBF_ASYNC;
 
                /*
index 34257992934c4184feba8505c8342e2e0a1e9edc..6a2f429391cc2118139bb80ccb6ab53fdaf365d4 100644 (file)
@@ -1080,10 +1080,9 @@ xfs_buf_iodone_callback_error(
         * async write failure at least once, but we also need to set the buffer
         * up to behave correctly now for repeated failures.
         */
-       if (!(bp->b_flags & (XBF_STALE|XBF_WRITE_FAIL)) ||
+       if (!(bp->b_flags & (XBF_STALE | XBF_WRITE_FAIL)) ||
             bp->b_last_error != bp->b_error) {
-               bp->b_flags |= (XBF_WRITE | XBF_ASYNC |
-                               XBF_DONE | XBF_WRITE_FAIL);
+               bp->b_flags |= (XBF_WRITE | XBF_DONE | XBF_WRITE_FAIL);
                bp->b_last_error = bp->b_error;
                bp->b_retries = 0;
                bp->b_first_retry_time = jiffies;