Re: [PATCH] MM: introduce memalloc_retry_wait()

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

 



Hi NeilBrown,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on jaegeuk-f2fs/dev-test]
[also build test ERROR on v5.16-rc1 next-20211118]
[cannot apply to xfs-linux/for-next]
[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/NeilBrown/MM-introduce-memalloc_retry_wait/20211117-122932
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev-test
config: arc-randconfig-r043-20211117 (attached as .config)
compiler: arceb-elf-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/1da355dc212c5f6ade3a21d4a5b1cfaf6b48ff0f
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review NeilBrown/MM-introduce-memalloc_retry_wait/20211117-122932
        git checkout 1da355dc212c5f6ade3a21d4a5b1cfaf6b48ff0f
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arc 

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

All errors (new ones prefixed by >>):

   fs/f2fs/super.c: In function 'f2fs_quota_read':
>> fs/f2fs/super.c:2417:33: error: implicit declaration of function 'memalloc_retry_wait' [-Werror=implicit-function-declaration]
    2417 |                                 memalloc_retry_wait(GFP_NOFS);
         |                                 ^~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/memalloc_retry_wait +2417 fs/f2fs/super.c

  2389	
  2390	#ifdef CONFIG_QUOTA
  2391	/* Read data from quotafile */
  2392	static ssize_t f2fs_quota_read(struct super_block *sb, int type, char *data,
  2393				       size_t len, loff_t off)
  2394	{
  2395		struct inode *inode = sb_dqopt(sb)->files[type];
  2396		struct address_space *mapping = inode->i_mapping;
  2397		block_t blkidx = F2FS_BYTES_TO_BLK(off);
  2398		int offset = off & (sb->s_blocksize - 1);
  2399		int tocopy;
  2400		size_t toread;
  2401		loff_t i_size = i_size_read(inode);
  2402		struct page *page;
  2403		char *kaddr;
  2404	
  2405		if (off > i_size)
  2406			return 0;
  2407	
  2408		if (off + len > i_size)
  2409			len = i_size - off;
  2410		toread = len;
  2411		while (toread > 0) {
  2412			tocopy = min_t(unsigned long, sb->s_blocksize - offset, toread);
  2413	repeat:
  2414			page = read_cache_page_gfp(mapping, blkidx, GFP_NOFS);
  2415			if (IS_ERR(page)) {
  2416				if (PTR_ERR(page) == -ENOMEM) {
> 2417					memalloc_retry_wait(GFP_NOFS);
  2418					goto repeat;
  2419				}
  2420				set_sbi_flag(F2FS_SB(sb), SBI_QUOTA_NEED_REPAIR);
  2421				return PTR_ERR(page);
  2422			}
  2423	
  2424			lock_page(page);
  2425	
  2426			if (unlikely(page->mapping != mapping)) {
  2427				f2fs_put_page(page, 1);
  2428				goto repeat;
  2429			}
  2430			if (unlikely(!PageUptodate(page))) {
  2431				f2fs_put_page(page, 1);
  2432				set_sbi_flag(F2FS_SB(sb), SBI_QUOTA_NEED_REPAIR);
  2433				return -EIO;
  2434			}
  2435	
  2436			kaddr = kmap_atomic(page);
  2437			memcpy(data, kaddr + offset, tocopy);
  2438			kunmap_atomic(kaddr);
  2439			f2fs_put_page(page, 1);
  2440	
  2441			offset = 0;
  2442			toread -= tocopy;
  2443			data += tocopy;
  2444			blkidx++;
  2445		}
  2446		return len;
  2447	}
  2448	

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

Attachment: .config.gz
Description: application/gzip


[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