linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>,
	ntfs3@lists.linux.dev
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 1/3] fs/ntfs3: Fix memory leak if fill_super failed
Date: Fri, 1 Oct 2021 11:56:56 +0800	[thread overview]
Message-ID: <202110011140.z4wWC4Uk-lkp@intel.com> (raw)
In-Reply-To: <f34b8f25-96c7-16d6-1e1c-6bb6c5342edd@paragon-software.com>

[-- Attachment #1: Type: text/plain, Size: 3349 bytes --]

Hi Konstantin,

I love your patch! Yet something to improve:

[auto build test ERROR on linux/master]
[also build test ERROR on linus/master v5.15-rc3 next-20210921]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Konstantin-Komarov/fs-ntfs3-Refactoring-of-super-c/20210929-210855
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 5816b3e6577eaa676ceb00a848f0fd65fe2adc29
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/82c276fadc515e07a29db5855fd04a0c5e5f2358
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Konstantin-Komarov/fs-ntfs3-Refactoring-of-super-c/20210929-210855
        git checkout 82c276fadc515e07a29db5855fd04a0c5e5f2358
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=xtensa SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   fs/ntfs3/super.c: In function 'ntfs_discard':
>> fs/ntfs3/super.c:1429:9: error: 'fc' undeclared (first use in this function); did you mean 'fd'?
    1429 |         fc->s_fs_info = sbi;
         |         ^~
         |         fd
   fs/ntfs3/super.c:1429:9: note: each undeclared identifier is reported only once for each function it appears in


vim +1429 fs/ntfs3/super.c

  1390	
  1391	/*
  1392	 * ntfs_discard - Issue a discard request (trim for SSD).
  1393	 */
  1394	int ntfs_discard(struct ntfs_sb_info *sbi, CLST lcn, CLST len)
  1395	{
  1396		int err;
  1397		u64 lbo, bytes, start, end;
  1398		struct super_block *sb;
  1399	
  1400		if (sbi->used.next_free_lcn == lcn + len)
  1401			sbi->used.next_free_lcn = lcn;
  1402	
  1403		if (sbi->flags & NTFS_FLAGS_NODISCARD)
  1404			return -EOPNOTSUPP;
  1405	
  1406		if (!sbi->options.discard)
  1407			return -EOPNOTSUPP;
  1408	
  1409		lbo = (u64)lcn << sbi->cluster_bits;
  1410		bytes = (u64)len << sbi->cluster_bits;
  1411	
  1412		/* Align up 'start' on discard_granularity. */
  1413		start = (lbo + sbi->discard_granularity - 1) &
  1414			sbi->discard_granularity_mask_inv;
  1415		/* Align down 'end' on discard_granularity. */
  1416		end = (lbo + bytes) & sbi->discard_granularity_mask_inv;
  1417	
  1418		sb = sbi->sb;
  1419		if (start >= end)
  1420			return 0;
  1421	
  1422		err = blkdev_issue_discard(sb->s_bdev, start >> 9, (end - start) >> 9,
  1423					   GFP_NOFS, 0);
  1424	
  1425		if (err == -EOPNOTSUPP)
  1426			sbi->flags |= NTFS_FLAGS_NODISCARD;
  1427	
  1428		/* Restore fc->s_fs_info to free memory allocated in ntfs_init_fs_context. */
> 1429		fc->s_fs_info = sbi;
  1430	
  1431		return err;
  1432	}
  1433	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 68942 bytes --]

  parent reply	other threads:[~2021-10-01  3:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-27 15:46 [PATCH 0/3] fs/ntfs3: Refactoring of super.c Konstantin Komarov
2021-09-27 15:47 ` [PATCH 1/3] fs/ntfs3: Fix memory leak if fill_super failed Konstantin Komarov
2021-09-27 18:40   ` Kari Argillander
2021-10-01  3:56   ` kernel test robot [this message]
2021-09-27 15:48 ` [PATCH 2/3] fs/ntfs3: Reject mount if boot's cluster size < media sector size Konstantin Komarov
2021-09-27 18:56   ` Kari Argillander
2021-09-28 17:21     ` Konstantin Komarov
2021-09-28 17:58       ` Kari Argillander
2021-09-27 15:48 ` [PATCH 3/3] fs/ntfs3: Refactoring of ntfs_init_from_boot Konstantin Komarov
2021-09-27 18:52   ` Kari Argillander

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=202110011140.z4wWC4Uk-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=almaz.alexandrovich@paragon-software.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ntfs3@lists.linux.dev \
    /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;
as well as URLs for NNTP newsgroup(s).