fs: rework getname_kernel to handle up to PATH_MAX sized filenames