summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_buf.c
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2016-07-20 10:48:51 +1000
committerDave Chinner <david@fromorbit.com>2016-07-20 10:48:51 +1000
commite97f6c545f963abd7de56a58a29ba73a9edee015 (patch)
treebce2c2af291173af1894a1fbbe22892de51d6e03 /fs/xfs/xfs_buf.c
parent1a695a905c18548062509178b98bc91e67510864 (diff)
xfs: fix xfs_error_get_cfg for negative errnos
xfs_error_get_cfg() is called with bp->b_error as an arg, which is negative, so the switch statement won't ever find any matches. This results in only the default error handler having any effect, as EIO/ENOSPC/ENODEV get ignored due to the wrong sign. It seems simplest to always flip the error sign to positive, so that we can handle either negative errors in bp->b_error, or possibly a positive errno via something like xfs_error_get_cfg(EIO) - this future-proofs the function. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_buf.c')
0 files changed, 0 insertions, 0 deletions