public inbox for [email protected]
 help / color / mirror / Atom feed
From: kernel test robot <[email protected]>
To: Stefan Roesch <[email protected]>,
	[email protected], [email protected]
Cc: [email protected], [email protected]
Subject: Re: [PATCH v3 2/3] fs: split off vfs_getdents function of getdents64 syscall
Date: Fri, 26 Nov 2021 16:43:54 +0800	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

Hi Stefan,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on de5de0813b7dbbb71fb5d677ed823505a0e685c5]

url:    https://github.com/0day-ci/linux/commits/Stefan-Roesch/io_uring-add-getdents64-support/20211126-072952
base:   de5de0813b7dbbb71fb5d677ed823505a0e685c5
config: um-i386_defconfig (https://download.01.org/0day-ci/archive/20211126/[email protected]/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/018019be0b26997402fe7ba8367e5260ec2aa8c8
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Stefan-Roesch/io_uring-add-getdents64-support/20211126-072952
        git checkout 018019be0b26997402fe7ba8367e5260ec2aa8c8
        # save the config file to linux build tree
        make W=1 ARCH=um SUBARCH=i386

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

All warnings (new ones prefixed by >>):

>> fs/readdir.c:379:5: warning: no previous prototype for 'vfs_getdents' [-Wmissing-prototypes]
     379 | int vfs_getdents(struct file *file, struct linux_dirent64 __user *dirent,
         |     ^~~~~~~~~~~~


vim +/vfs_getdents +379 fs/readdir.c

   370	
   371	/**
   372	 * vfs_getdents - getdents without fdget
   373	 * @file    : pointer to file struct of directory
   374	 * @dirent  : pointer to user directory structure
   375	 * @count   : size of buffer
   376	 * @ctx_pos : if file pos is used, pass -1,
   377	 *            if ctx pos is used, pass ctx pos
   378	 */
 > 379	int vfs_getdents(struct file *file, struct linux_dirent64 __user *dirent,
   380			 unsigned int count, s64 ctx_pos)
   381	{
   382		struct getdents_callback64 buf = {
   383			.ctx.actor = filldir64,
   384			.ctx.pos = ctx_pos,
   385			.count = count,
   386			.current_dir = dirent
   387		};
   388		int error;
   389	
   390		error = do_iterate_dir(file, &buf.ctx, ctx_pos < 0);
   391		if (error >= 0)
   392			error = buf.error;
   393		if (buf.prev_reclen) {
   394			struct linux_dirent64 __user * lastdirent;
   395			typeof(lastdirent->d_off) d_off = buf.ctx.pos;
   396	
   397			lastdirent = (void __user *) buf.current_dir - buf.prev_reclen;
   398			if (put_user(d_off, &lastdirent->d_off))
   399				error = -EFAULT;
   400			else
   401				error = count - buf.count;
   402		}
   403	
   404		return error;
   405	}
   406	

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

  parent reply	other threads:[~2021-11-26  8:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-25 23:25 [PATCH v3 0/3] io_uring: add getdents64 support Stefan Roesch
2021-11-25 23:25 ` [PATCH v3 1/3] fs: add parameter use_fpos to iterate_dir function Stefan Roesch
2021-11-25 23:25 ` [PATCH v3 2/3] fs: split off vfs_getdents function of getdents64 syscall Stefan Roesch
2021-11-26  6:44   ` kernel test robot
2021-11-26  8:43   ` kernel test robot [this message]
2021-11-25 23:25 ` [PATCH v3 3/3] io_uring: add support for getdents64 Stefan Roesch

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 \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox