]> www.infradead.org Git - users/hch/xfsprogs.git/commit
xfs: replace xfs_mode_to_ftype table with switch statement
authorAmir Goldstein <amir73il@gmail.com>
Thu, 26 Jan 2017 02:02:41 +0000 (20:02 -0600)
committerEric Sandeen <sandeen@redhat.com>
Thu, 26 Jan 2017 02:02:41 +0000 (20:02 -0600)
commit3297e0caa25a235d2351ce3e1a90b8425242528d
tree51649fb267054f757aa6d6497e01889417e87548
parent3e86cfde198e2cf8f79a12451ff7da0e89f69176
xfs: replace xfs_mode_to_ftype table with switch statement

Source kernel commit: 1fc4d33fed124fb182e8e6c214e973a29389ae83

The size of the xfs_mode_to_ftype[] conversion table
was too small to handle an invalid value of mode=S_IFMT.

Instead of fixing the table size, replace the conversion table
with a conversion helper that uses a switch statement.

Suggested-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_dir2.c
libxfs/xfs_dir2.h
repair/dino_chunks.c
repair/phase6.c