[bug report] add default quota limit mount options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux