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. Honza -- Jan Kara <jack@xxxxxxxx> SUSE Labs, CR