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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git 
pending-4.9
head:   4b5a13c7c300502dc61385a0a6858c1d747884ec
commit: 3975f55d867b6d3061405f787ff1cd6034a5b90b [28/31] NFS: Do not report 
writeback errors in nfs_getattr()
:::::: branch date: 8 hours ago
:::::: commit date: 8 hours ago
config: i386-randconfig-s001-20220221 
(https://download.01.org/0day-ci/archive/20220221/[email protected]/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # 
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/commit/?id=3975f55d867b6d3061405f787ff1cd6034a5b90b
        git remote add sashal-stable 
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
        git fetch --no-tags sashal-stable pending-4.9
        git checkout 3975f55d867b6d3061405f787ff1cd6034a5b90b
        # save the config file to linux build tree
        mkdir build_dir
        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/inode.c:693:1: sparse: sparse: unused label 'out'
   fs/nfs/inode.c: In function 'nfs_getattr':
   fs/nfs/inode.c:693:1: warning: label 'out' defined but not used 
[-Wunused-label]
    out:
    ^~~

vim +/out +693 fs/nfs/inode.c

311324ad171366 Trond Myklebust   2014-02-07  655  
^1da177e4c3f41 Linus Torvalds    2005-04-16  656  int nfs_getattr(struct 
vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
^1da177e4c3f41 Linus Torvalds    2005-04-16  657  {
2b0143b5c986be David Howells     2015-03-17  658        struct inode *inode = 
d_inode(dentry);
5529680981807b Chuck Lever       2005-08-18  659        int need_atime = 
NFS_I(inode)->cache_validity & NFS_INO_INVALID_ATIME;
16caf5b6101d03 Jan Kara          2014-10-23  660        int err = 0;
^1da177e4c3f41 Linus Torvalds    2005-04-16  661  
f4ce1299b329e9 Trond Myklebust   2013-08-19  662        
trace_nfs_getattr_enter(inode);
acdc53b2146c7e Trond Myklebust   2010-02-19  663        /* Flush out writes to 
the server in order to update c/mtime.  */
3975f55d867b6d Trond Myklebust   2022-02-15  664        if 
(S_ISREG(inode->i_mode))
3975f55d867b6d Trond Myklebust   2022-02-15  665                
filemap_write_and_wait(inode->i_mapping);
fc33a7bb9c6dd8 Christoph Hellwig 2006-01-09  666  
fc33a7bb9c6dd8 Christoph Hellwig 2006-01-09  667        /*
fc33a7bb9c6dd8 Christoph Hellwig 2006-01-09  668         * We may force a 
getattr if the user cares about atime.
fc33a7bb9c6dd8 Christoph Hellwig 2006-01-09  669         *
fc33a7bb9c6dd8 Christoph Hellwig 2006-01-09  670         * Note that we only 
have to check the vfsmount flags here:
fc33a7bb9c6dd8 Christoph Hellwig 2006-01-09  671         *  - NFS always sets 
S_NOATIME by so checking it would give a
fc33a7bb9c6dd8 Christoph Hellwig 2006-01-09  672         *    bogus result
fc33a7bb9c6dd8 Christoph Hellwig 2006-01-09  673         *  - NFS never sets 
MS_NOATIME or MS_NODIRATIME so there is
fc33a7bb9c6dd8 Christoph Hellwig 2006-01-09  674         *    no point in 
checking those.
fc33a7bb9c6dd8 Christoph Hellwig 2006-01-09  675         */
fc33a7bb9c6dd8 Christoph Hellwig 2006-01-09  676        if ((mnt->mnt_flags & 
MNT_NOATIME) ||
fc33a7bb9c6dd8 Christoph Hellwig 2006-01-09  677            ((mnt->mnt_flags & 
MNT_NODIRATIME) && S_ISDIR(inode->i_mode)))
^1da177e4c3f41 Linus Torvalds    2005-04-16  678                need_atime = 0;
fc33a7bb9c6dd8 Christoph Hellwig 2006-01-09  679  
311324ad171366 Trond Myklebust   2014-02-07  680        if (need_atime || 
nfs_need_revalidate_inode(inode)) {
311324ad171366 Trond Myklebust   2014-02-07  681                struct 
nfs_server *server = NFS_SERVER(inode);
311324ad171366 Trond Myklebust   2014-02-07  682  
311324ad171366 Trond Myklebust   2014-02-07  683                if 
(server->caps & NFS_CAP_READDIRPLUS)
311324ad171366 Trond Myklebust   2014-02-07  684                        
nfs_request_parent_use_readdirplus(dentry);
311324ad171366 Trond Myklebust   2014-02-07  685                err = 
__nfs_revalidate_inode(server, inode);
311324ad171366 Trond Myklebust   2014-02-07  686        }
4e769b934e7638 Peter Staubach    2007-08-03  687        if (!err) {
^1da177e4c3f41 Linus Torvalds    2005-04-16  688                
generic_fillattr(inode, stat);
f43bf0bebed7c3 Trond Myklebust   2007-10-09  689                stat->ino = 
nfs_compat_user_ino64(NFS_FILEID(inode));
7ef5ca4fe41e6a NeilBrown         2015-05-08  690                if 
(S_ISDIR(inode->i_mode))
7ef5ca4fe41e6a NeilBrown         2015-05-08  691                        
stat->blksize = NFS_SERVER(inode)->dtsize;
4e769b934e7638 Peter Staubach    2007-08-03  692        }
acdc53b2146c7e Trond Myklebust   2010-02-19 @693  out:
f4ce1299b329e9 Trond Myklebust   2013-08-19  694        
trace_nfs_getattr_exit(inode, err);
^1da177e4c3f41 Linus Torvalds    2005-04-16  695        return err;
^1da177e4c3f41 Linus Torvalds    2005-04-16  696  }
ddda8e0aa8b955 Bryan Schumaker   2012-07-30  697  
EXPORT_SYMBOL_GPL(nfs_getattr);
^1da177e4c3f41 Linus Torvalds    2005-04-16  698  

:::::: The code at line 693 was first introduced by commit
:::::: acdc53b2146c7ee67feb1f02f7bc3020126514b8 NFS: Replace 
__nfs_write_mapping with sync_inode()

:::::: TO: Trond Myklebust <[email protected]>
:::::: CC: Trond Myklebust <[email protected]>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to