All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Dominique Martinet <asmadeus@codewreck.org>,
	Eric Van Hensbergen <ericvh@kernel.org>,
	Latchesar Ionkov <lucho@ionkov.net>,
	Christian Schoenebeck <linux_oss@crudebyte.com>
Cc: oe-kbuild-all@lists.linux.dev, v9fs@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 9p: v9fs_fid_find: also lookup by inode if not found dentry
Date: Fri, 24 May 2024 04:46:26 +0800	[thread overview]
Message-ID: <202405240419.mUEPAfWQ-lkp@intel.com> (raw)
In-Reply-To: <20240523113638.1196299-1-asmadeus@codewreck.org>

Hi Dominique,

kernel test robot noticed the following build warnings:

[auto build test WARNING on v6.9]
[also build test WARNING on linus/master next-20240523]
[cannot apply to ericvh-v9fs/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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Dominique-Martinet/9p-v9fs_fid_find-also-lookup-by-inode-if-not-found-dentry/20240523-193912
base:   v6.9
patch link:    https://lore.kernel.org/r/20240523113638.1196299-1-asmadeus%40codewreck.org
patch subject: [PATCH] 9p: v9fs_fid_find: also lookup by inode if not found dentry
config: x86_64-defconfig (https://download.01.org/0day-ci/archive/20240524/202405240419.mUEPAfWQ-lkp@intel.com/config)
compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240524/202405240419.mUEPAfWQ-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405240419.mUEPAfWQ-lkp@intel.com/

All warnings (new ones prefixed by >>):

   fs/9p/fid.c: In function 'v9fs_fid_find':
>> fs/9p/fid.c:137:9: warning: no return statement in function returning non-void [-Wreturn-type]
     137 |         }
         |         ^
   fs/9p/fid.c: At top level:
   fs/9p/fid.c:139:9: error: expected identifier or '(' before 'return'
     139 |         return ret;
         |         ^~~~~~
   fs/9p/fid.c:140:1: error: expected identifier or '(' before '}' token
     140 | }
         | ^


vim +137 fs/9p/fid.c

987a64850996db Greg Kurz           2020-09-23  103  
987a64850996db Greg Kurz           2020-09-23  104  
3ed8491c8a75ce Eric Van Hensbergen 2005-09-09  105  /**
ba17674fe02909 Latchesar Ionkov    2007-10-17  106   * v9fs_fid_find - retrieve a fid that belongs to the specified uid
3ed8491c8a75ce Eric Van Hensbergen 2005-09-09  107   * @dentry: dentry to look for fid in
ba17674fe02909 Latchesar Ionkov    2007-10-17  108   * @uid: return fid that belongs to the specified user
ba17674fe02909 Latchesar Ionkov    2007-10-17  109   * @any: if non-zero, return any fid associated with the dentry
3ed8491c8a75ce Eric Van Hensbergen 2005-09-09  110   *
3ed8491c8a75ce Eric Van Hensbergen 2005-09-09  111   */
3ed8491c8a75ce Eric Van Hensbergen 2005-09-09  112  
b464255699077c Eric W. Biederman   2013-01-30  113  static struct p9_fid *v9fs_fid_find(struct dentry *dentry, kuid_t uid, int any)
3ed8491c8a75ce Eric Van Hensbergen 2005-09-09  114  {
ba17674fe02909 Latchesar Ionkov    2007-10-17  115  	struct p9_fid *fid, *ret;
bd238fb431f319 Latchesar Ionkov    2007-07-10  116  
4b8e992392a246 Al Viro             2014-08-19  117  	p9_debug(P9_DEBUG_VFS, " dentry: %pd (%p) uid %d any %d\n",
4b8e992392a246 Al Viro             2014-08-19  118  		 dentry, dentry, from_kuid(&init_user_ns, uid),
b464255699077c Eric W. Biederman   2013-01-30  119  		 any);
ba17674fe02909 Latchesar Ionkov    2007-10-17  120  	ret = NULL;
aaeb7ecfb48ad4 Al Viro             2013-02-28  121  	/* we'll recheck under lock if there's anything to look in */
22e424feb6658c Dominique Martinet  2022-01-29  122  	if (dentry->d_fsdata) {
aaeb7ecfb48ad4 Al Viro             2013-02-28  123  		struct hlist_head *h = (struct hlist_head *)&dentry->d_fsdata;
9a268faa5f8627 Sohaib Mohamed      2021-10-01  124  
634095dab2a200 Al Viro             2013-02-27  125  		spin_lock(&dentry->d_lock);
56a79b7b021bf1 Linus Torvalds      2013-03-03  126  		hlist_for_each_entry(fid, h, dlist) {
b464255699077c Eric W. Biederman   2013-01-30  127  			if (any || uid_eq(fid->uid, uid)) {
ba17674fe02909 Latchesar Ionkov    2007-10-17  128  				ret = fid;
b48dbb998d70b7 Dominique Martinet  2022-06-12  129  				p9_fid_get(ret);
ba17674fe02909 Latchesar Ionkov    2007-10-17  130  				break;
ba17674fe02909 Latchesar Ionkov    2007-10-17  131  			}
ba17674fe02909 Latchesar Ionkov    2007-10-17  132  		}
634095dab2a200 Al Viro             2013-02-27  133  		spin_unlock(&dentry->d_lock);
7894f99a4c6ef6 Dominique Martinet  2024-05-23  134  	}
7894f99a4c6ef6 Dominique Martinet  2024-05-23  135  	if (!ret && dentry->d_inode)
1543b4c5071c54 Eric Van Hensbergen 2023-03-27  136  		ret = v9fs_fid_find_inode(dentry->d_inode, false, uid, any);
ba17674fe02909 Latchesar Ionkov    2007-10-17 @137  	}
bd238fb431f319 Latchesar Ionkov    2007-07-10  138  
ba17674fe02909 Latchesar Ionkov    2007-10-17  139  	return ret;
3ed8491c8a75ce Eric Van Hensbergen 2005-09-09  140  }
3ed8491c8a75ce Eric Van Hensbergen 2005-09-09  141  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  parent reply	other threads:[~2024-05-23 20:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-23 11:36 [PATCH] 9p: v9fs_fid_find: also lookup by inode if not found dentry Dominique Martinet
2024-05-23 20:25 ` kernel test robot
2024-05-23 20:46 ` kernel test robot [this message]
2024-05-23 21:00 ` [PATCH v2] " Dominique Martinet
2024-05-26  8:43   ` Christian Schoenebeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202405240419.mUEPAfWQ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=asmadeus@codewreck.org \
    --cc=ericvh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux_oss@crudebyte.com \
    --cc=lucho@ionkov.net \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=v9fs@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.