Some FAT filesystems do not have . and .. entries in some directories. Currently, such filesystems are not mounted because such directories will have no links. They are also corrupted as inodes are evicted and that leads to such directories clusters being marked as freed. Later mounts will then error out when finding such clusters. These two commits allow those filesystems to be mounted and . and .. to still appear when listing such directories. v2: - Also ignore the absence of . directory and always have at least two links. - Add a second commit to always emit . and .. at readdir. Thadeu Lima de Souza Cascardo (2): fat: ignore . and .. subdirs and always add links to dirs fat: always use dir_emit_dots and ignore . and .. entries fs/fat/dir.c | 28 ++++++++++++---------------- fs/fat/inode.c | 2 +- 2 files changed, 13 insertions(+), 17 deletions(-) -- 2.34.1