erofs: ensure regular inodes for file-backed mounts
authorGao Xiang <hsiangkao@linux.alibaba.com>
Tue, 17 Sep 2024 13:08:03 +0000 (21:08 +0800)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Fri, 11 Oct 2024 05:36:41 +0000 (13:36 +0800)
commit416a8b2c02fe2a5a9fbdf2a35ea294b78d939f84
tree138579c557a06651b1bd958322e51cf2324ef954
parent9852d85ec9d492ebef56dc5f229416c925758edc
erofs: ensure regular inodes for file-backed mounts

Only regular inodes are allowed for file-backed mounts, not directories
(as seen in the original syzbot case) or special inodes.

Also ensure that .read_folio() is implemented on the underlying fs
for the primary device.

Fixes: fb176750266a ("erofs: add file-backed mount support")
Reported-by: syzbot+001306cd9c92ce0df23f@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/r/00000000000011bdde0622498ee3@google.com
Tested-by: syzbot+001306cd9c92ce0df23f@syzkaller.appspotmail.com
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20240917130803.32418-1-hsiangkao@linux.alibaba.com
fs/erofs/super.c