How to check in linux kernel at vfs layer whether the file object is for a directory or a file?
I have found that there is a function called is_dx(dir)
which checks for this but it is present in namei.c
in ext3
or ext4
. I need to do this at vfs layer that is independent of the file system.