* Re: [PATCH v2 05/14] NFS: Remove the label from the nfs4_lookup_res struct
[not found] <20211022171113.16739-6-Anna.Schumaker@Netapp.com>
@ 2021-11-07 1:24 ` kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-11-07 1:24 UTC (permalink / raw)
To: schumaker.anna; +Cc: llvm, kbuild-all
[-- Attachment #1: Type: text/plain, Size: 7589 bytes --]
Hi,
I love your patch! Perhaps something to improve:
[auto build test WARNING on trondmy-nfs/linux-next]
[also build test WARNING on v5.15]
[cannot apply to next-20211106]
[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/schumaker-anna-gmail-com/NFS-Clean-up-nfs4_label-allocation/20211024-104605
base: git://git.linux-nfs.org/projects/trondmy/linux-nfs.git linux-next
config: x86_64-randconfig-r034-20211025 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project a461fa64bb37cffd73f683c74f6b0780379fc2ca)
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/ca3c213e9f927361803d5558b63140f228d83303
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review schumaker-anna-gmail-com/NFS-Clean-up-nfs4_label-allocation/20211024-104605
git checkout ca3c213e9f927361803d5558b63140f228d83303
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> fs/nfs/dir.c:1773:6: warning: variable 'error' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (fhandle == NULL || fattr == NULL)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/nfs/dir.c:1802:44: note: uninitialized use occurs here
trace_nfs_lookup_exit(dir, dentry, flags, error);
^~~~~
fs/nfs/dir.c:1773:2: note: remove the 'if' if its condition is always false
if (fhandle == NULL || fattr == NULL)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> fs/nfs/dir.c:1773:6: warning: variable 'error' is used uninitialized whenever '||' condition is true [-Wsometimes-uninitialized]
if (fhandle == NULL || fattr == NULL)
^~~~~~~~~~~~~~~
fs/nfs/dir.c:1802:44: note: uninitialized use occurs here
trace_nfs_lookup_exit(dir, dentry, flags, error);
^~~~~
fs/nfs/dir.c:1773:6: note: remove the '||' if its condition is always false
if (fhandle == NULL || fattr == NULL)
^~~~~~~~~~~~~~~~~~
fs/nfs/dir.c:1755:11: note: initialize the variable 'error' to silence this warning
int error;
^
= 0
2 warnings generated.
vim +1773 fs/nfs/dir.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 1747
597d92891b8859 Bryan Schumaker 2012-07-16 1748 struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, unsigned int flags)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1749 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 1750 struct dentry *res;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1751 struct inode *inode = NULL;
e1fb4d05d5a326 Trond Myklebust 2010-04-16 1752 struct nfs_fh *fhandle = NULL;
e1fb4d05d5a326 Trond Myklebust 2010-04-16 1753 struct nfs_fattr *fattr = NULL;
a1147b8281bda9 Trond Myklebust 2020-02-05 1754 unsigned long dir_verifier;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1755 int error;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1756
6de1472f1a4a3b Al Viro 2013-09-16 1757 dfprintk(VFS, "NFS: lookup(%pd2)\n", dentry);
91d5b47023b608 Chuck Lever 2006-03-20 1758 nfs_inc_stats(dir, NFSIOS_VFSLOOKUP);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1759
130f9ab75dc3af Al Viro 2016-03-07 1760 if (unlikely(dentry->d_name.len > NFS_SERVER(dir)->namelen))
130f9ab75dc3af Al Viro 2016-03-07 1761 return ERR_PTR(-ENAMETOOLONG);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1762
fd6840714d9cf6 Trond Myklebust 2006-09-05 1763 /*
fd6840714d9cf6 Trond Myklebust 2006-09-05 1764 * If we're doing an exclusive create, optimize away the lookup
fd6840714d9cf6 Trond Myklebust 2006-09-05 1765 * but don't hash the dentry.
fd6840714d9cf6 Trond Myklebust 2006-09-05 1766 */
9f6d44d418b1f4 Trond Myklebust 2018-05-10 1767 if (nfs_is_exclusive_create(dir, flags) || flags & LOOKUP_RENAME_TARGET)
130f9ab75dc3af Al Viro 2016-03-07 1768 return NULL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1769
e1fb4d05d5a326 Trond Myklebust 2010-04-16 1770 res = ERR_PTR(-ENOMEM);
e1fb4d05d5a326 Trond Myklebust 2010-04-16 1771 fhandle = nfs_alloc_fhandle();
ca3c213e9f9273 Anna Schumaker 2021-10-22 1772 fattr = nfs_alloc_fattr_with_label(NFS_SERVER(dir));
e1fb4d05d5a326 Trond Myklebust 2010-04-16 @1773 if (fhandle == NULL || fattr == NULL)
e1fb4d05d5a326 Trond Myklebust 2010-04-16 1774 goto out;
e1fb4d05d5a326 Trond Myklebust 2010-04-16 1775
a1147b8281bda9 Trond Myklebust 2020-02-05 1776 dir_verifier = nfs_save_change_attribute(dir);
6e0d0be715fe04 Trond Myklebust 2013-08-20 1777 trace_nfs_lookup_enter(dir, dentry, flags);
ca3c213e9f9273 Anna Schumaker 2021-10-22 1778 error = NFS_PROTO(dir)->lookup(dir, dentry, fhandle, fattr);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1779 if (error == -ENOENT)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1780 goto no_entry;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1781 if (error < 0) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 1782 res = ERR_PTR(error);
ca3c213e9f9273 Anna Schumaker 2021-10-22 1783 goto out;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1784 }
ca3c213e9f9273 Anna Schumaker 2021-10-22 1785 inode = nfs_fhget(dentry->d_sb, fhandle, fattr, fattr->label);
bf0c84f1614bff Namhyung Kim 2010-12-28 1786 res = ERR_CAST(inode);
03f28e3a2059fc Trond Myklebust 2006-03-20 1787 if (IS_ERR(res))
ca3c213e9f9273 Anna Schumaker 2021-10-22 1788 goto out;
54ceac45159860 David Howells 2006-08-22 1789
63519fbc67d0d9 Trond Myklebust 2016-11-19 1790 /* Notify readdir to use READDIRPLUS */
63519fbc67d0d9 Trond Myklebust 2016-11-19 1791 nfs_force_use_readdirplus(dir);
d69ee9b85541a6 Trond Myklebust 2012-05-01 1792
^1da177e4c3f41 Linus Torvalds 2005-04-16 1793 no_entry:
41d28bca2da4bd Al Viro 2014-10-12 1794 res = d_splice_alias(inode, dentry);
9eaef27b36a6b7 Trond Myklebust 2006-10-21 1795 if (res != NULL) {
9eaef27b36a6b7 Trond Myklebust 2006-10-21 1796 if (IS_ERR(res))
ca3c213e9f9273 Anna Schumaker 2021-10-22 1797 goto out;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1798 dentry = res;
9eaef27b36a6b7 Trond Myklebust 2006-10-21 1799 }
a1147b8281bda9 Trond Myklebust 2020-02-05 1800 nfs_set_verifier(dentry, dir_verifier);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1801 out:
ca3c213e9f9273 Anna Schumaker 2021-10-22 1802 trace_nfs_lookup_exit(dir, dentry, flags, error);
e1fb4d05d5a326 Trond Myklebust 2010-04-16 1803 nfs_free_fattr(fattr);
e1fb4d05d5a326 Trond Myklebust 2010-04-16 1804 nfs_free_fhandle(fhandle);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1805 return res;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1806 }
ddda8e0aa8b955 Bryan Schumaker 2012-07-30 1807 EXPORT_SYMBOL_GPL(nfs_lookup);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1808
---
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: 34491 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-07 1:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20211022171113.16739-6-Anna.Schumaker@Netapp.com>
2021-11-07 1:24 ` [PATCH v2 05/14] NFS: Remove the label from the nfs4_lookup_res struct kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox