On Mon 03-04-23 10:47:54, cem@xxxxxxxxxx wrote: > From: Lukas Czerner <lczerner@xxxxxxxxxx> > > Make shmem_inode_acct_block() return proper error code instead of bool. > This will be useful later when we introduce quota support. > > There should be no functional change. > > Signed-off-by: Lukas Czerner <lczerner@xxxxxxxxxx> > Signed-off-by: Carlos Maiolino <cmaiolino@xxxxxxxxxx> Looks good to me, except one minor nit. > @@ -1589,7 +1590,8 @@ static struct folio *shmem_alloc_and_acct_folio(gfp_t gfp, struct inode *inode, > huge = false; > nr = huge ? HPAGE_PMD_NR : 1; > > - if (!shmem_inode_acct_block(inode, nr)) > + err = shmem_inode_acct_block(inode, nr); > + if (err) > goto failed; > > if (huge) The initialization of 'err' in this function is unused now so it can be dropped. Honza -- Jan Kara <jack@xxxxxxxx> SUSE Labs, CR