On Wed, Sep 16, 2020 at 07:38:58PM +0800, Ye Bin wrote: > From: Jan Kara <jack@xxxxxxx> > > ext4_mb_discard_group_preallocations() can be releasing group lock with > preallocations accumulated on its local list. Thus although > discard_pa_seq was incremented and concurrent allocating processes will > be retrying allocations, it can happen that premature ENOSPC error is > returned because blocks used for preallocations are not available for > reuse yet. Make sure we always free locally accumulated preallocations > before releasing group lock. > > Fixes: 07b5b8e1ac40 ("ext4: mballoc: introduce pcpu seqcnt for freeing PA to improve ENOSPC handling") > Signed-off-by: Jan Kara <jack@xxxxxxx> > Signed-off-by: Ye Bin <yebin10@xxxxxxxxxx> > Reviewed-by: Ritesh Harjani <riteshh@xxxxxxxxxxxxx> Thanks, applied. - Ted