diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c index 85c74c10fc3f..380128cb62cc 100644 --- a/fs/hfsplus/super.c +++ b/fs/hfsplus/super.c @@ -51,6 +51,12 @@ static int hfsplus_system_read_inode(struct inode *inode) return -EIO; } + /* + * Assign a dummy file type, for may_open() requires that + * an inode has a valid file type. + */ + inode->i_mode = S_IFREG; + return 0; }