summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_error.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-07-20 02:37:13 +0200
committerDave Chinner <david@fromorbit.com>2016-07-20 02:37:13 +0200
commitfbc21f33cda0a8e13ebd71fe2e23a21d4b79afbb (patch)
tree10c37d3ce264a198fc9f42449f2ce49c5280db92 /fs/xfs/xfs_error.c
parentxfs: fix type confusion in xfs_ioc_swapext (diff)
downloadlinux-fbc21f33cda0a8e13ebd71fe2e23a21d4b79afbb.tar.xz
linux-fbc21f33cda0a8e13ebd71fe2e23a21d4b79afbb.zip
xfs: don't allow negative error tags
Errors go from zero which means no error to XFS_ERRTAG_MAX (22). My static checker complains that xfs_errortag_add() puts an upper bound on this but not a lower bound. Let's fix it by making it unsigned. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_error.c')
-rw-r--r--fs/xfs/xfs_error.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_error.c b/fs/xfs/xfs_error.c
index 88693a98fac5..acd941314a4b 100644
--- a/fs/xfs/xfs_error.c
+++ b/fs/xfs/xfs_error.c
@@ -55,7 +55,7 @@ xfs_error_test(int error_tag, int *fsidp, char *expression,
}
int
-xfs_errortag_add(int error_tag, xfs_mount_t *mp)
+xfs_errortag_add(unsigned int error_tag, xfs_mount_t *mp)
{
int i;
int len;