vfs: make O_PATH file descriptors usable for 'fstat()'
We already use them for openat() and friends, but fstat() also wants to be able to use O_PATH file descriptors. This should make it more directly comparable to the O_SEARCH of Solaris. Note that you could already do the same thing with "fstatat()" and an empty path, but just doing "fstat()" directly is simpler and faster, so there is no reason not to just allow it directly. See also commit 332a2e12 , which did the same thing for fchdir, for the same reasons. Reported-by: ольга крыжановская <email@example.com> Cc: Al Viro <firstname.lastname@example.org> Cc: email@example.com # O_PATH introduced in 3.0+ Signed-off-by: Linus Torvalds <firstname.lastname@example.org>