[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202110011140.z4wWC4Uk-lkp@intel.com>
Date: Fri, 1 Oct 2021 11:56:56 +0800
From: kernel test robot <lkp@...el.com>
To: Konstantin Komarov <almaz.alexandrovich@...agon-software.com>,
ntfs3@...ts.linux.dev
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 1/3] fs/ntfs3: Fix memory leak if fill_super failed
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@...el.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
Download attachment ".config.gz" of type "application/gzip" (68942 bytes)
Powered by blists - more mailing lists