linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [bug report] add default quota limit mount options
@ 2023-07-17  9:37 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2023-07-17  9:37 UTC (permalink / raw)
  To: lczerner; +Cc: linux-mm

Hello Lukas Czerner,

The patch 50b6187cfaa2: "add default quota limit mount options" from
Jul 13, 2023, leads to the following Smatch static checker warning:

	mm/shmem_quota.c:253 shmem_is_empty_dquot()
	error: uninitialized symbol 'bhardlimit'.

mm/shmem_quota.c
    236 static bool shmem_is_empty_dquot(struct dquot *dquot)
    237 {
    238         struct shmem_sb_info *sbinfo = dquot->dq_sb->s_fs_info;
    239         qsize_t bhardlimit;
    240         qsize_t ihardlimit;
    241 
    242         if (dquot->dq_id.type == USRQUOTA) {
    243                 bhardlimit = sbinfo->qlimits.usrquota_bhardlimit;
    244                 ihardlimit = sbinfo->qlimits.usrquota_ihardlimit;
    245         } else if (dquot->dq_id.type == GRPQUOTA) {
    246                 bhardlimit = sbinfo->qlimits.grpquota_bhardlimit;
    247                 ihardlimit = sbinfo->qlimits.grpquota_ihardlimit;
    248         }
    249 
    250         if (test_bit(DQ_FAKE_B, &dquot->dq_flags) ||

Can DQ_FAKE_B be set for PRJQUOTA?

    251                 (dquot->dq_dqb.dqb_curspace == 0 &&
    252                  dquot->dq_dqb.dqb_curinodes == 0 &&
--> 253                  dquot->dq_dqb.dqb_bhardlimit == bhardlimit &&
    254                  dquot->dq_dqb.dqb_ihardlimit == ihardlimit))
    255                 return true;
    256 
    257         return false;
    258 }

regards,
dan carpenter


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-07-17  9:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-17  9:37 [bug report] add default quota limit mount options Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox