mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@inria.fr>
To: Ritesh Harjani <riteshh@linux.ibm.com>
Cc: Theodore Ts'o <tytso@mit.edu>,
	linux-kernel@vger.kernel.org,  oe-kbuild-all@lists.linux.dev
Subject: fs/ext4/mballoc.c:4597:47-50: opportunity for str_yes_no(ret) (fwd)
Date: Sun, 6 Oct 2024 17:10:57 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2410061710220.12182@hadrien> (raw)



---------- Forwarded message ----------
Date: Sun, 6 Oct 2024 22:59:43 +0800
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Julia Lawall <julia.lawall@inria.fr>
Subject: fs/ext4/mballoc.c:4597:47-50: opportunity for str_yes_no(ret)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Ritesh Harjani <riteshh@linux.ibm.com>
CC: "Theodore Ts'o" <tytso@mit.edu>

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/202410062256.BoynX3c2-lkp@intel.com/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 <lkp@intel.com>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202410062256.BoynX3c2-lkp@intel.com/

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

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2024-10-06 15:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.22.394.2410061710220.12182@hadrien \
    --to=julia.lawall@inria.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=riteshh@linux.ibm.com \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®