All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Christian Brauner <brauner@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Christian Brauner <christianvanbrauner@gmail.com>
Subject: [brauner-github:vfs-6.16.misc 18/18] mm/readahead.c:703:30: error: use of undeclared identifier 'fd_file'; did you mean 'get_file'?
Date: Mon, 21 Apr 2025 19:13:53 +0800	[thread overview]
Message-ID: <202504211930.SWe5ODLS-lkp@intel.com> (raw)

tree:   https://github.com/brauner/linux.git vfs-6.16.misc
head:   ac6355451deea7f96f5ca40a226fb0685b0475af
commit: ac6355451deea7f96f5ca40a226fb0685b0475af [18/18] fs: add S_ANON_INODE
config: arm-randconfig-001-20250421 (https://download.01.org/0day-ci/archive/20250421/202504211930.SWe5ODLS-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project f819f46284f2a79790038e1f6649172789734ae8)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250421/202504211930.SWe5ODLS-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/202504211930.SWe5ODLS-lkp@intel.com/

All errors (new ones prefixed by >>):

>> mm/readahead.c:703:30: error: use of undeclared identifier 'fd_file'; did you mean 'get_file'?
     703 |         if (IS_ANON_FILE(file_inode(fd_file)))
         |                                     ^~~~~~~
         |                                     get_file
   include/linux/fs.h:2404:31: note: expanded from macro 'IS_ANON_FILE'
    2404 | #define IS_ANON_FILE(inode)     ((inode)->i_flags & S_ANON_INODE)
         |                                   ^
   include/linux/fs.h:1131:28: note: 'get_file' declared here
    1131 | static inline struct file *get_file(struct file *f)
         |                            ^
   1 error generated.


vim +703 mm/readahead.c

   690	
   691	ssize_t ksys_readahead(int fd, loff_t offset, size_t count)
   692	{
   693		CLASS(fd, f)(fd);
   694	
   695		if (fd_empty(f) || !(fd_file(f)->f_mode & FMODE_READ))
   696			return -EBADF;
   697	
   698		/*
   699		 * The readahead() syscall is intended to run only on files
   700		 * that can execute readahead. If readahead is not possible
   701		 * on this file, then we must return -EINVAL.
   702		 */
 > 703		if (IS_ANON_FILE(file_inode(fd_file)))
   704			return -EINVAL;
   705		if (!fd_file(f)->f_mapping || !fd_file(f)->f_mapping->a_ops ||
   706		    (!S_ISREG(file_inode(fd_file(f))->i_mode) &&
   707		    !S_ISBLK(file_inode(fd_file(f))->i_mode)))
   708			return -EINVAL;
   709	
   710		return vfs_fadvise(fd_file(f), offset, count, POSIX_FADV_WILLNEED);
   711	}
   712	

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

                 reply	other threads:[~2025-04-21 11:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202504211930.SWe5ODLS-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=brauner@kernel.org \
    --cc=christianvanbrauner@gmail.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@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.