summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_icache.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_icache.c')
-rw-r--r--fs/xfs/xfs_icache.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c
index 35dde2ef517f..f99c4ec2f5de 100644
--- a/fs/xfs/xfs_icache.c
+++ b/fs/xfs/xfs_icache.c
@@ -871,6 +871,8 @@ xfs_imeta_iget(
goto bad_rele;
if (xfs_mode_to_ftype(VFS_I(ip)->i_mode) != ftype)
goto bad_rele;
+ if (xfs_sb_version_hasmetadir(&mp->m_sb) && !xfs_is_metadata_inode(ip))
+ goto bad_rele;
*ipp = ip;
return 0;