diff options
-rw-r--r-- | fs/udf/inode.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/udf/inode.c b/fs/udf/inode.c index 9ee269d3d546..96873fa2f683 100644 --- a/fs/udf/inode.c +++ b/fs/udf/inode.c @@ -1813,8 +1813,13 @@ struct inode *__udf_iget(struct super_block *sb, struct kernel_lb_addr *ino, if (!inode) return ERR_PTR(-ENOMEM); - if (!(inode->i_state & I_NEW)) + if (!(inode->i_state & I_NEW)) { + if (UDF_I(inode)->i_hidden != hidden_inode) { + iput(inode); + return ERR_PTR(-EFSCORRUPTED); + } return inode; + } memcpy(&UDF_I(inode)->i_location, ino, sizeof(struct kernel_lb_addr)); err = udf_read_inode(inode, hidden_inode); |