diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index 04f90df8dbae..3e9b088800b1 100644 --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c @@ -3117,8 +3117,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);