On Tue, Apr 25, 2023 at 02:30:42PM +0200, Jan Kara wrote: > On Tue 25-04-23 13:57:25, cem@xxxxxxxxxx wrote: > > From: Lukas Czerner <lczerner@xxxxxxxxxx> > > > > Allow system administrator to set default global quota limits at tmpfs > > mount time. > > > > Signed-off-by: Lukas Czerner <lczerner@xxxxxxxxxx> > > Signed-off-by: Carlos Maiolino <cmaiolino@xxxxxxxxxx> > ... > > @@ -224,6 +233,29 @@ static int shmem_acquire_dquot(struct dquot *dquot) > > return ret; > > } > > > > +static bool shmem_is_empty_dquot(struct dquot *dquot) > > +{ > > + struct shmem_sb_info *sbinfo = dquot->dq_sb->s_fs_info; > > + qsize_t bhardlimit; > > + qsize_t ihardlimit; > > + > > + if (dquot->dq_id.type == USRQUOTA) { > > + bhardlimit = sbinfo->qlimits.usrquota_bhardlimit; > > + ihardlimit = sbinfo->qlimits.usrquota_ihardlimit; > > + } else if (dquot->dq_id.type == GRPQUOTA) { > > + bhardlimit = sbinfo->qlimits.usrquota_bhardlimit; > > + ihardlimit = sbinfo->qlimits.usrquota_ihardlimit; > > There should be grpquota in the above two lines. Otherwise the patch looks > good to me. Uff, sorry, copy/paste mistake. Can I add your RwB once I fix it? Or do you want me to send a V4? > > Honza > > -- > Jan Kara <jack@xxxxxxxx> > SUSE Labs, CR -- Carlos Maiolino