diff --git a/mm/shmem.c b/mm/shmem.c index 3a7587a0314d..7d52cd4b504d 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -2175,10 +2175,7 @@ static struct inode *shmem_get_inode(struct super_block *sb, const struct inode bool shmem_mapping(struct address_space *mapping) { - if (!mapping->host) - return false; - - return mapping->host->i_sb->s_op == &shmem_ops; + return mapping->a_ops == &shmem_aops; } #ifdef CONFIG_TMPFS