diff --git a/fs/nilfs2/btree.c b/fs/nilfs2/btree.c index ef5061bb56da..8a280379e813 100644 --- a/fs/nilfs2/btree.c +++ b/fs/nilfs2/btree.c @@ -2103,11 +2103,14 @@ static int nilfs_btree_propagate(struct nilfs_bmap *btree, ret = nilfs_btree_do_lookup(btree, path, key, NULL, level + 1, 0); if (ret < 0) { - if (unlikely(ret == -ENOENT)) + if (unlikely(ret == -ENOENT)) { nilfs_crit(btree->b_inode->i_sb, "writing node/leaf block does not appear in b-tree (ino=%lu) at key=%llu, level=%d", btree->b_inode->i_ino, (unsigned long long)key, level); + /* Notify bmap layer of metadata corruption */ + ret = -EINVAL; + } goto out; }