CC: [email protected]
TO: Sasha Levin <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git 
pending-5.12
head:   282b79d5a786465b3966c586c8d0d645c068e805
commit: 00c05609c916fba733fd62694931fbfb810cc6c3 [422/492] NFS: Fix fscache 
read from NFS after cache error
:::::: branch date: 12 hours ago
:::::: commit date: 12 hours ago
config: i386-randconfig-s001-20210718 (attached as .config)
compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        # 
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/commit/?id=00c05609c916fba733fd62694931fbfb810cc6c3
        git remote add sashal-linux-stable 
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
        git fetch --no-tags sashal-linux-stable pending-5.12
        git checkout 00c05609c916fba733fd62694931fbfb810cc6c3
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir 
ARCH=i386 SHELL=/bin/bash fs/nfs/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>


sparse warnings: (new ones prefixed by >>)
>> fs/nfs/read.c:388:1: sparse: sparse: unused label 'out'

vim +/out +388 fs/nfs/read.c

1e83b173b2663b Dave Wysochanski 2021-01-28  324  
^1da177e4c3f41 Linus Torvalds   2005-04-16  325  /*
^1da177e4c3f41 Linus Torvalds   2005-04-16  326   * Read a page over NFS.
^1da177e4c3f41 Linus Torvalds   2005-04-16  327   * We read the page 
synchronously in the following case:
^1da177e4c3f41 Linus Torvalds   2005-04-16  328   *  -  The error flag is set 
for this page. This happens only when a
^1da177e4c3f41 Linus Torvalds   2005-04-16  329   *     previous async read 
operation failed.
^1da177e4c3f41 Linus Torvalds   2005-04-16  330   */
^1da177e4c3f41 Linus Torvalds   2005-04-16  331  int nfs_readpage(struct file 
*file, struct page *page)
^1da177e4c3f41 Linus Torvalds   2005-04-16  332  {
1af7e7f8c12f52 Dave Wysochanski 2021-01-28  333         struct nfs_readdesc 
desc;
d56b4ddf7781ef Mel Gorman       2012-07-31  334         struct inode *inode = 
page_file_mapping(page)->host;
49dee70052b894 Dave Wysochanski 2021-01-28  335         int ret;
^1da177e4c3f41 Linus Torvalds   2005-04-16  336  
^1da177e4c3f41 Linus Torvalds   2005-04-16  337         dprintk("NFS: 
nfs_readpage (%p %ld@%lu)\n",
8cd797887ae0a7 Huang Ying       2016-10-07  338                 page, 
PAGE_SIZE, page_index(page));
91d5b47023b608 Chuck Lever      2006-03-20  339         nfs_inc_stats(inode, 
NFSIOS_VFSREADPAGE);
91d5b47023b608 Chuck Lever      2006-03-20  340  
^1da177e4c3f41 Linus Torvalds   2005-04-16  341         /*
^1da177e4c3f41 Linus Torvalds   2005-04-16  342          * Try to flush any 
pending writes to the file..
^1da177e4c3f41 Linus Torvalds   2005-04-16  343          *
^1da177e4c3f41 Linus Torvalds   2005-04-16  344          * NOTE! Because we own 
the page lock, there cannot
^1da177e4c3f41 Linus Torvalds   2005-04-16  345          * be any new pending 
writes generated at this point
^1da177e4c3f41 Linus Torvalds   2005-04-16  346          * for this page (other 
pages can be written to).
^1da177e4c3f41 Linus Torvalds   2005-04-16  347          */
49dee70052b894 Dave Wysochanski 2021-01-28  348         ret = 
nfs_wb_page(inode, page);
49dee70052b894 Dave Wysochanski 2021-01-28  349         if (ret)
de05a0cc2a2ae1 Trond Myklebust  2007-05-20  350                 goto out_unlock;
de05a0cc2a2ae1 Trond Myklebust  2007-05-20  351         if (PageUptodate(page))
de05a0cc2a2ae1 Trond Myklebust  2007-05-20  352                 goto out_unlock;
^1da177e4c3f41 Linus Torvalds   2005-04-16  353  
49dee70052b894 Dave Wysochanski 2021-01-28  354         ret = -ESTALE;
5f004cf2aa8494 Trond Myklebust  2006-09-14  355         if (NFS_STALE(inode))
de05a0cc2a2ae1 Trond Myklebust  2007-05-20  356                 goto out_unlock;
5f004cf2aa8494 Trond Myklebust  2006-09-14  357  
^1da177e4c3f41 Linus Torvalds   2005-04-16  358         if (file == NULL) {
49dee70052b894 Dave Wysochanski 2021-01-28  359                 ret = -EBADF;
1af7e7f8c12f52 Dave Wysochanski 2021-01-28  360                 desc.ctx = 
nfs_find_open_context(inode, NULL, FMODE_READ);
1af7e7f8c12f52 Dave Wysochanski 2021-01-28  361                 if (desc.ctx == 
NULL)
de05a0cc2a2ae1 Trond Myklebust  2007-05-20  362                         goto 
out_unlock;
^1da177e4c3f41 Linus Torvalds   2005-04-16  363         } else
1af7e7f8c12f52 Dave Wysochanski 2021-01-28  364                 desc.ctx = 
get_nfs_open_context(nfs_file_open_context(file));
8e0969f0451eaf Trond Myklebust  2006-12-13  365  
00c05609c916fb Dave Wysochanski 2021-06-29  366         xchg(&desc.ctx->error, 
0);
9a9fc1c03315f1 David Howells    2009-04-03  367         if (!IS_SYNC(inode)) {
1af7e7f8c12f52 Dave Wysochanski 2021-01-28  368                 ret = 
nfs_readpage_from_fscache(desc.ctx, inode, page);
49dee70052b894 Dave Wysochanski 2021-01-28  369                 if (ret == 0)
00c05609c916fb Dave Wysochanski 2021-06-29  370                         goto 
out_wait;
9a9fc1c03315f1 David Howells    2009-04-03  371         }
9a9fc1c03315f1 David Howells    2009-04-03  372  
1e83b173b2663b Dave Wysochanski 2021-01-28  373         
nfs_pageio_init_read(&desc.pgio, inode, false,
1e83b173b2663b Dave Wysochanski 2021-01-28  374                              
&nfs_async_read_completion_ops);
1e83b173b2663b Dave Wysochanski 2021-01-28  375  
1e83b173b2663b Dave Wysochanski 2021-01-28  376         ret = 
readpage_async_filler(&desc, page);
1e83b173b2663b Dave Wysochanski 2021-01-28  377  
1e83b173b2663b Dave Wysochanski 2021-01-28  378         if (!ret)
1e83b173b2663b Dave Wysochanski 2021-01-28  379                 
nfs_pageio_complete_read(&desc.pgio, inode);
1e83b173b2663b Dave Wysochanski 2021-01-28  380  
1e83b173b2663b Dave Wysochanski 2021-01-28  381         ret = 
desc.pgio.pg_error < 0 ? desc.pgio.pg_error : 0;
00c05609c916fb Dave Wysochanski 2021-06-29  382  out_wait:
49dee70052b894 Dave Wysochanski 2021-01-28  383         if (!ret) {
49dee70052b894 Dave Wysochanski 2021-01-28  384                 ret = 
wait_on_page_locked_killable(page);
49dee70052b894 Dave Wysochanski 2021-01-28  385                 if 
(!PageUptodate(page) && !ret)
1af7e7f8c12f52 Dave Wysochanski 2021-01-28  386                         ret = 
xchg(&desc.ctx->error, 0);
8f54c7a4babf58 Trond Myklebust  2019-08-15  387         }
9a9fc1c03315f1 David Howells    2009-04-03 @388  out:
1af7e7f8c12f52 Dave Wysochanski 2021-01-28  389         
put_nfs_open_context(desc.ctx);
49dee70052b894 Dave Wysochanski 2021-01-28  390         return ret;
de05a0cc2a2ae1 Trond Myklebust  2007-05-20  391  out_unlock:
^1da177e4c3f41 Linus Torvalds   2005-04-16  392         unlock_page(page);
49dee70052b894 Dave Wysochanski 2021-01-28  393         return ret;
^1da177e4c3f41 Linus Torvalds   2005-04-16  394  }
^1da177e4c3f41 Linus Torvalds   2005-04-16  395  

:::::: The code at line 388 was first introduced by commit
:::::: 9a9fc1c03315f1606596e55b4096d39e2079a041 NFS: Read pages from FS-Cache 
into an NFS inode

:::::: TO: David Howells <[email protected]>
:::::: CC: David Howells <[email protected]>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to