]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: replace xfs_mode_to_ftype table with switch statement
authorAmir Goldstein <amir73il@gmail.com>
Tue, 17 Jan 2017 19:41:43 +0000 (11:41 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Tue, 17 Jan 2017 19:41:43 +0000 (11:41 -0800)
commit2c9f14c2cf94159a3426cdfbe3f869864f40d19d
treed9b1fe50fada342ee0d7e1eee47c8d79f1741a50
parent61b89c59fc32ebf31f3eab9d007a9f26faee893a
xfs: replace xfs_mode_to_ftype table with switch statement

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>
fs/xfs/libxfs/xfs_dir2.c
fs/xfs/libxfs/xfs_dir2.h
fs/xfs/xfs_iops.c