xfs: don't allow negative error tags
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 20 Jul 2016 00:37:13 +0000 (10:37 +1000)
committerDave Chinner <david@fromorbit.com>
Wed, 20 Jul 2016 00:37:13 +0000 (10:37 +1000)
commitfbc21f33cda0a8e13ebd71fe2e23a21d4b79afbb
tree10c37d3ce264a198fc9f42449f2ce49c5280db92
parent7f1b62457b58f9bb586a1b2ff7fe271b56196bd2
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>
fs/xfs/xfs_error.c
fs/xfs/xfs_error.h