xfs: check for a valid error_tag in errortag_add
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 21 Jun 2016 01:53:28 +0000 (11:53 +1000)
committerDave Chinner <david@fromorbit.com>
Tue, 21 Jun 2016 01:53:28 +0000 (11:53 +1000)
commit128f24d5d9def3c47b6b659b2454f0426a347144
treed710ea5064f2301990475e8f6081e9e8313aaa74
parent479c641273df632478cda7fe76b833df64e319bc
xfs: check for a valid error_tag in errortag_add

Currently we don't check the error_tag when someone's trying to set up
error injection testing.  If userspace passes in a value we don't know
about, send back an error.  This will help xfstests to _notrun a test
that uses error injection to test things like log replay.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_error.c