fs/ext4/mballoc.c:4597:47-50: opportunity for str_yes_no(ret)
kernel test robot
build botBCC: [email protected]
CC: [email protected]
CC: [email protected]
TO: Ritesh Harjani <[email protected]>
CC: "Theodore Ts'o" <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 8f602276d3902642fdc3429b548d73c745446601 commit: 07b5b8e1ac4004b7db1065a301df65cd434c31c9 ext4: mballoc: introduce pcpu seqcnt for freeing PA to improve ENOSPC handling date: 4 years, 4 months ago
:::::: branch date: 17 hours ago
:::::: commit date: 4 years, 4 months ago
config: x86_64-randconfig-102-20241006 (https://download.01.org/0day-ci/archive/20241006/[email protected]/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]> | Reported-by: Julia Lawall <[email protected]> | Closes: https://lore.kernel.org/r/[email protected]/
cocci warnings: (new ones prefixed by >>)
>> fs/ext4/mballoc.c:4597:47-50: opportunity for str_yes_no(ret)
vim +4597 fs/ext4/mballoc.c
c9de560ded61fa Alex Tomas 2008-01-29 4577
cf5e2ca6c99077 Ritesh Harjani 2020-05-20 4578 static bool ext4_mb_discard_preallocations_should_retry(struct super_block *sb,
07b5b8e1ac4004 Ritesh Harjani 2020-05-20 4579 struct ext4_allocation_context *ac, u64 *seq)
cf5e2ca6c99077 Ritesh Harjani 2020-05-20 4580 {
cf5e2ca6c99077 Ritesh Harjani 2020-05-20 4581 int freed;
07b5b8e1ac4004 Ritesh Harjani 2020-05-20 4582 u64 seq_retry = 0;
07b5b8e1ac4004 Ritesh Harjani 2020-05-20 4583 bool ret = false;
cf5e2ca6c99077 Ritesh Harjani 2020-05-20 4584
cf5e2ca6c99077 Ritesh Harjani 2020-05-20 4585 freed = ext4_mb_discard_preallocations(sb, ac->ac_o_ex.fe_len);
07b5b8e1ac4004 Ritesh Harjani 2020-05-20 4586 if (freed) {
07b5b8e1ac4004 Ritesh Harjani 2020-05-20 4587 ret = true;
07b5b8e1ac4004 Ritesh Harjani 2020-05-20 4588 goto out_dbg;
07b5b8e1ac4004 Ritesh Harjani 2020-05-20 4589 }
07b5b8e1ac4004 Ritesh Harjani 2020-05-20 4590 seq_retry = ext4_get_discard_pa_seq_sum();
07b5b8e1ac4004 Ritesh Harjani 2020-05-20 4591 if (seq_retry != *seq) {
07b5b8e1ac4004 Ritesh Harjani 2020-05-20 4592 *seq = seq_retry;
07b5b8e1ac4004 Ritesh Harjani 2020-05-20 4593 ret = true;
07b5b8e1ac4004 Ritesh Harjani 2020-05-20 4594 }
07b5b8e1ac4004 Ritesh Harjani 2020-05-20 4595
07b5b8e1ac4004 Ritesh Harjani 2020-05-20 4596 out_dbg:
07b5b8e1ac4004 Ritesh Harjani 2020-05-20 @4597 mb_debug(sb, "freed %d, retry ? %s\n", freed, ret ? "yes" : "no");
07b5b8e1ac4004 Ritesh Harjani 2020-05-20 4598 return ret;
cf5e2ca6c99077 Ritesh Harjani 2020-05-20 4599 }cf5e2ca6c99077 Ritesh Harjani 2020-05-20 4600
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki