The current check (`mode & IFDIR != 0`) only kind of works accidentally. It should be `mode & IFMT == IFDIR`.
Judging from my bits/stat.h, block devices and sockets would also pass the `mode & IFDIR != 0` condition. That is not exactly catastrophic, we just never tested what happens what happens if we were to mark something that is not a directory a submount, and so we only allow directories to be submount points until someone needs guest submounts for mount points that are not directories. Note that the kernel also has a guard to only allow submounts on directory nodes, so in practice this patch should not change any user-visible behavior. --- https://gitlab.com/virtio-fs/virtiofsd-rs/-/merge_requests/30 _______________________________________________ Virtio-fs mailing list [email protected] https://listman.redhat.com/mailman/listinfo/virtio-fs
