fs: common implementation of file type

Many file systems use a copy&paste implementation
of dirent to on-disk file type conversions.

Create a common implementation to be used by file systems
with some useful conversion helpers to reduce open coded
file type conversions in file system code.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
Phillip Potter 2019-01-21 00:54:27 +00:00 • committed by Jan Kara
commit bbe7449e25
5 changed files with 184 additions and 17 deletions