syzbot is reporting that hfsplus_system_read_inode() from hfsplus_iget() from hfsplus_btree_open() from hfsplus_fill_super() succeeds with inode->i_mode == 0, for hfsplus_system_read_inode() does not call hfsplus_get_perms() for updating inode->i_mode value. Reported-by: syzbot Closes: https://syzkaller.appspot.com/bug?extid=895c23f6917da440ed0d Signed-off-by: Tetsuo Handa --- fs/hfsplus/super.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c index aaffa9e060a0..82e0bf066e3b 100644 --- a/fs/hfsplus/super.c +++ b/fs/hfsplus/super.c @@ -52,6 +52,7 @@ static int hfsplus_system_read_inode(struct inode *inode) default: return -EIO; } + inode->i_mode = S_IFREG; return 0; } -- 2.47.3