diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index f79705af3aca..37f3c2ebe6f8 100644 --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c @@ -3075,8 +3075,10 @@ ext4_xattr_block_cache_find(struct inode *inode, bh = ext4_sb_bread(inode->i_sb, ce->e_value, REQ_PRIO); if (IS_ERR(bh)) { - if (PTR_ERR(bh) == -ENOMEM) + if (PTR_ERR(bh) == -ENOMEM) { + mb_cache_entry_put(ea_block_cache, ce); return NULL; + } bh = NULL; EXT4_ERROR_INODE(inode, "block %lu read error", (unsigned long)ce->e_value);