aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r--fs/f2fs/super.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index bf11740..d1ffa87 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -626,6 +626,8 @@ static struct inode *f2fs_nfs_get_inode(struct super_block *sb,
if (unlikely(ino < F2FS_ROOT_INO(sbi)))
return ERR_PTR(-ESTALE);
+ if (unlikely(ino >= NM_I(sbi)->max_nid))
+ return ERR_PTR(-ESTALE);
/*
* f2fs_iget isn't quite right if the inode is currently unallocated!