All of lore.kernel.org
 help / color / mirror / Atom feed
* [axboe-block:io_uring-handle 5/5] io_uring/openclose.c:546: undefined reference to `get_path_from_fd'
@ 2025-04-30  1:48 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-04-30  1:48 UTC (permalink / raw)
  To: Jens Axboe; +Cc: oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git io_uring-handle
head:   0519531750fa77b52759fc3c717486f69e4d69bc
commit: 0519531750fa77b52759fc3c717486f69e4d69bc [5/5] io_uring: add support for IORING_OP_OPEN_BY_HANDLE
config: um-randconfig-001-20250430 (https://download.01.org/0day-ci/archive/20250430/202504300928.F2ipN9le-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250430/202504300928.F2ipN9le-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/202504300928.F2ipN9le-lkp@intel.com/

All errors (new ones prefixed by >>):

   /usr/bin/ld: io_uring/openclose.o: in function `io_open_by_handle':
>> io_uring/openclose.c:546: undefined reference to `get_path_from_fd'
   /usr/bin/ld: io_uring/openclose.o: in function `__io_open_by_handle':
>> io_uring/openclose.c:510: undefined reference to `do_handle_to_path'
   /usr/bin/ld: io_uring/openclose.o: in function `io_open_by_handle':
>> io_uring/openclose.c:554: undefined reference to `may_decode_fh'
   collect2: error: ld returned 1 exit status


vim +546 io_uring/openclose.c

   499	
   500	static int __io_open_by_handle(struct io_kiocb *req,
   501				       unsigned int issue_flags,
   502				       const struct export_operations *eops)
   503	{
   504		struct io_open_by_handle *h = io_kiocb_to_cmd(req, struct io_open_by_handle);
   505		struct io_open_by_handle_async *ah = req->async_data;
   506		struct path path __free(path_put) = { };
   507		struct file *file;
   508		int ret, fd;
   509	
 > 510		ret = do_handle_to_path(&ah->handle, &path, &h->ctx);
   511		path_put(&h->ctx.root);
   512		if (ret < 0)
   513			return ret;
   514	
   515		if (!(h->flags & IORING_OPEN_HANDLE_FIXED)) {
   516			fd = get_unused_fd_flags(O_CLOEXEC);
   517			if (fd < 0)
   518				return fd;
   519		}
   520	
   521		if (eops->open)
   522			file = eops->open(&path, h->open_flags);
   523		else
   524			file = file_open_root(&path, "", h->open_flags, 0);
   525		if (IS_ERR(file)) {
   526			if (!(h->flags & IORING_OPEN_HANDLE_FIXED))
   527				put_unused_fd(fd);
   528			return PTR_ERR(file);
   529		}
   530	
   531		if (!(h->flags & IORING_OPEN_HANDLE_FIXED)) {
   532			fd_install(fd, file);
   533			return fd;
   534		}
   535	
   536		return io_fixed_fd_install(req, issue_flags, file, h->file_slot);
   537	}
   538	
   539	int io_open_by_handle(struct io_kiocb *req, unsigned int issue_flags)
   540	{
   541		struct io_open_by_handle *h = io_kiocb_to_cmd(req, struct io_open_by_handle);
   542		struct io_open_by_handle_async *ah = req->async_data;
   543		const struct export_operations *eops;
   544		int ret;
   545	
 > 546		ret = get_path_from_fd(h->dirfd, &h->ctx.root);
   547		if (ret < 0)
   548			goto err;
   549	
   550		eops = h->ctx.root.mnt->mnt_sb->s_export_op;
   551		if (eops && eops->permission)
   552			ret = eops->permission(&h->ctx, h->open_flags);
   553		else
 > 554			ret = may_decode_fh(&h->ctx, h->open_flags);

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-04-30  1:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-30  1:48 [axboe-block:io_uring-handle 5/5] io_uring/openclose.c:546: undefined reference to `get_path_from_fd' kernel test robot

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.