diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index d223fb41ececd4cd6f8ce0da577f6bf4f3adc89c..caface6964e96c24f9e8335f8ab938fae575d8a0 100644 --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c @@ -3068,8 +3068,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);