]> git.karo-electronics.de Git - linux-beck.git/commit
xfs: replace xfs_mode_to_ftype table with switch statement
authorAmir Goldstein <amir73il@gmail.com>
Thu, 2 Feb 2017 07:56:01 +0000 (08:56 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 4 Feb 2017 08:47:12 +0000 (09:47 +0100)
commitb5f68e24cc7bc3492ebc5c70f3ef6babcbd4188b
tree1d649f96a2455dd0597fb3886cead8d7d74a3a4d
parent4fac84ba1da7aa62dea520dcedd4f6de117d8f2b
xfs: replace xfs_mode_to_ftype table with switch statement

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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/xfs/libxfs/xfs_dir2.c
fs/xfs/libxfs/xfs_dir2.h
fs/xfs/xfs_iops.c