File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -472,11 +472,18 @@ static int __nilfs_read_inode(struct super_block *sb,
472
472
inode -> i_op = & nilfs_symlink_inode_operations ;
473
473
inode_nohighmem (inode );
474
474
inode -> i_mapping -> a_ops = & nilfs_aops ;
475
- } else {
475
+ } else if (S_ISCHR (inode -> i_mode ) || S_ISBLK (inode -> i_mode ) ||
476
+ S_ISFIFO (inode -> i_mode ) || S_ISSOCK (inode -> i_mode )) {
476
477
inode -> i_op = & nilfs_special_inode_operations ;
477
478
init_special_inode (
478
479
inode , inode -> i_mode ,
479
480
huge_decode_dev (le64_to_cpu (raw_inode -> i_device_code )));
481
+ } else {
482
+ nilfs_error (sb ,
483
+ "invalid file type bits in mode 0%o for inode %lu" ,
484
+ inode -> i_mode , ino );
485
+ err = - EIO ;
486
+ goto failed_unmap ;
480
487
}
481
488
nilfs_ifile_unmap_inode (raw_inode );
482
489
brelse (bh );
You can’t perform that action at this time.
0 commit comments