[rhvgoyal:ioannis-fanotify 11/18] fs/fuse/dir.c:1904:21: error: 'struct inode' has no member named 'i_fsnotify_mask'

From: kernel test robot
Date: Fri Apr 29 2022 - 18:45:31 EST


tree: https://github.com/rhvgoyal/linux ioannis-fanotify
head: 10887e7003a6a801e521d59daff76f0c035f061f
commit: 834efb94978e62da824c5f4cde878fe592c2426d [11/18] FUSE, VFS: Add the fuse_fsnotify_update_mark inode operation
config: arc-randconfig-r043-20220428 (https://download.01.org/0day-ci/archive/20220430/202204300631.E5yUzmoT-lkp@xxxxxxxxx/config)
compiler: arceb-elf-gcc (GCC) 11.3.0
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/rhvgoyal/linux/commit/834efb94978e62da824c5f4cde878fe592c2426d
git remote add rhvgoyal https://github.com/rhvgoyal/linux
git fetch --no-tags rhvgoyal ioannis-fanotify
git checkout 834efb94978e62da824c5f4cde878fe592c2426d
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash fs/fuse/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

fs/fuse/dir.c: In function 'fuse_fsnotify_update_mark':
>> fs/fuse/dir.c:1904:21: error: 'struct inode' has no member named 'i_fsnotify_mask'
1904 | mask = inode->i_fsnotify_mask & ~(FS_IN_IGNORED | FS_UNMOUNT |
| ^~
fs/fuse/dir.c:1911:107: warning: left-hand operand of comma expression has no effect [-Wunused-value]
1911 | FS_UNMOUNT, FS_IN_IGNORED,
| ^
fs/fuse/dir.c:1911:122: warning: left-hand operand of comma expression has no effect [-Wunused-value]
1911 | FS_UNMOUNT, FS_IN_IGNORED,
| ^
fs/fuse/dir.c:1916:16: error: implicit declaration of function 'fuse_fsnotify_send_request' [-Werror=implicit-function-declaration]
1916 | return fuse_fsnotify_send_request(inode, mask);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors


vim +1904 fs/fuse/dir.c

1892
1893 static int fuse_fsnotify_update_mark(struct inode *inode)
1894 {
1895 uint64_t mask;
1896 /*
1897 * We have to remove the bits added to the mask before being attached
1898 * or detached to the inode, since these bits are going to be
1899 * added by the "remote" host kernel. If these bits were still enabled
1900 * in the mask that was sent to the "remote" kernel then the watch would
1901 * be rejected as an unsupported value. These bits are added by the
1902 * fsnotify subsystem thus we use the corresponding fsnotify bits here.
1903 */
> 1904 mask = inode->i_fsnotify_mask & ~(FS_IN_IGNORED | FS_UNMOUNT |
1905 FS_IN_ONESHOT | FS_EXCL_UNLINK);
1906
1907 if (!inode)
1908 return -EINVAL;
1909
1910 if (mask && !(mask & ALL_FSNOTIFY_EVENTS & ~(ALL_FSNOTIFY_DIRENT_EVENTS |
1911 FS_UNMOUNT, FS_IN_IGNORED,
1912 FS_ERROR)))
1913 return -EINVAL;
1914
1915 /* Send the inode and the aggregated mask for the inode*/
1916 return fuse_fsnotify_send_request(inode, mask);
1917 }
1918

--
0-DAY CI Kernel Test Service
https://01.org/lkp