# sed: can't read modules.order: No such file or directory

## doskanoness

Hi,

I've encountered an issue while compiling kernel 5.15.11:

```
gentoo /usr/src/linux # make modules_install

sed: can't read modules.order: No such file or directory

make: *** [Makefile:1501: __modinst_pre] Error 2
```

I executed commands in the following order: make olddefconfig, make -j12, make modules_install everything as root.

The first two commands have been executed successfully.

Any ideas what could be wrong? Thanks.

----------

## Jaglover

Your 'make -j12' command did not finish successfully.

----------

## alamahant

Plz

run

```

###save your .config file and then run

make clean

make mrproper

make -j12

echo $?

###if output is 0 then

make modules_install

make install

```

Most probably your "make" phase failed without your noticing it.

----------

## NeddySeagoon

or maybe there are no modules?

----------

## Jaglover

 *alamahant wrote:*   

> Plz
> 
> run
> 
> ```
> ...

 

```
Cleaning targets:

  clean           - Remove most generated files but keep the config and

                    enough build support to build external modules

  mrproper        - Remove all generated files + config + various backup files

  distclean       - mrproper + remove editor backup and patch files

```

There is no need to do 'make clean' if you intend to do 'make mrproper'. And you need to copy back your .config (assuming it was customized) before running 'make' to build the kernel and modules.

In any case, please run 'make help' and familiarize yourself with targets before using them.

----------

## doskanoness

after make -j12:

```
gentoo /usr/src/linux # echo $?

2
```

----------

## alamahant

Your kernel failed to build.

What is the error exactly?

----------

## doskanoness

 *alamahant wrote:*   

> Your kernel failed to build.
> 
> What is the error exactly?

 

The output is only:

```
# make -j12

   ...

  LD [M]  drivers/iio/pressure/bmp280.o

  CC [M]  drivers/gnss/ubx.o

  LD [M]  drivers/gnss/gnss.o

  CC [M]  drivers/fpga/dfl-fme-mgr.o

  CC [M]  drivers/fpga/dfl-fme-br.o

  CC [M]  drivers/iio/temperature/hid-sensor-temperature.o

  CC [M]  drivers/iio/light/vcnl4035.o

  LD [M]  drivers/gnss/gnss-serial.o

  LD [M]  drivers/gnss/gnss-mtk.o

  LD [M]  drivers/gnss/gnss-sirf.o

  CC [M]  drivers/iio/light/veml6030.o

  CC [M]  drivers/fpga/dfl-fme-region.o

  CC [M]  drivers/fpga/dfl-afu-main.o

  CC [M]  drivers/iio/trigger/iio-trig-interrupt.o

  CC [M]  drivers/iio/industrialio-core.o

  CC [M]  drivers/iio/trigger/iio-trig-loop.o

  CC [M]  drivers/fpga/dfl-afu-region.o

  CC [M]  drivers/fpga/dfl-afu-dma-region.o

  CC [M]  drivers/iio/temperature/maxim_thermocouple.o

  LD [M]  drivers/gnss/gnss-ubx.o

  CC [M]  drivers/fpga/dfl-afu-error.o

  CC [M]  drivers/iio/temperature/max31856.o

  CC [M]  drivers/iio/temperature/mlx90614.o

  CC [M]  drivers/iio/temperature/mlx90632.o

  CC [M]  drivers/iio/light/vl6180.o

  LD [M]  drivers/infiniband/hw/hfi1/hfi1.o

  CC [M]  drivers/fpga/dfl-n3000-nios.o

  CC [M]  drivers/iio/light/zopt2201.o

  CC [M]  drivers/fpga/dfl-pci.o

  LD [M]  drivers/fpga/dfl-fme.o

  CC [M]  drivers/iio/temperature/tmp117.o

  CC [M]  drivers/iio/industrialio-event.o

  CC [M]  drivers/iio/inkern.o

  LD [M]  drivers/fpga/dfl-afu.o

  CC [M]  drivers/iio/industrialio-buffer.o

  CC [M]  drivers/iio/industrialio-trigger.o

  CC [M]  drivers/iio/industrialio-configfs.o

  CC [M]  drivers/iio/industrialio-sw-device.o

  CC [M]  drivers/iio/industrialio-sw-trigger.o

  CC [M]  drivers/iio/industrialio-triggered-event.o

  LD [M]  drivers/iio/industrialio.o

gentoo /usr/src/linux # make modules_install

sed: can't read modules.order: No such file or directory

make: *** [Makefile:1501: __modinst_pre] Error 2

```

How can I view the error messages?

----------

## NeddySeagoon

doskanoness,

The error messages are all jumbled up because of make -j12.

Run the build one step at a time without -j12.  It will stop at the error.

As long as you do not run 

```
make clean
```

make won't actually build anything.

It will just traverse the kernel tree, comparing output file timestamps with input file timestamps and work out that there is nothing to do.

It will get to the problem and stop quite quickly.

As make does this timestamp compare, it can get in a real mess if your system time ever steps backwards.

----------

## doskanoness

I patched the kernel with the shiftfs patch from the genpatches 5.10.88 because I need to have shiftfs support for LXD.

Is planned including patch 5000_shiftfs-ubuntu-20.04.patch in the 5.15.11 gentoo-sources?

Below is the output from make:

```
...

  CC [M]  fs/afs/server_list.o

  CC [M]  fs/afs/super.o

  CC [M]  fs/afs/vlclient.o

  CC [M]  fs/afs/vl_alias.o

  CC [M]  fs/afs/vl_list.o

  CC [M]  fs/afs/vl_probe.o

  CC [M]  fs/afs/vl_rotate.o

  CC [M]  fs/afs/volume.o

  CC [M]  fs/afs/write.o

  CC [M]  fs/afs/xattr.o

  CC [M]  fs/afs/yfsclient.o

  CC [M]  fs/afs/proc.o

  LD [M]  fs/afs/kafs.o

  CC [M]  fs/nilfs2/inode.o

  CC [M]  fs/nilfs2/file.o

  CC [M]  fs/nilfs2/dir.o

  CC [M]  fs/nilfs2/super.o

  CC [M]  fs/nilfs2/namei.o

  CC [M]  fs/nilfs2/page.o

  CC [M]  fs/nilfs2/mdt.o

  CC [M]  fs/nilfs2/btnode.o

  CC [M]  fs/nilfs2/bmap.o

  CC [M]  fs/nilfs2/btree.o

  CC [M]  fs/nilfs2/direct.o

  CC [M]  fs/nilfs2/dat.o

  CC [M]  fs/nilfs2/recovery.o

  CC [M]  fs/nilfs2/the_nilfs.o

  CC [M]  fs/nilfs2/segbuf.o

  CC [M]  fs/nilfs2/segment.o

  CC [M]  fs/nilfs2/cpfile.o

  CC [M]  fs/nilfs2/sufile.o

  CC [M]  fs/nilfs2/ifile.o

  CC [M]  fs/nilfs2/alloc.o

  CC [M]  fs/nilfs2/gcinode.o

  CC [M]  fs/nilfs2/ioctl.o

  CC [M]  fs/nilfs2/sysfs.o

  LD [M]  fs/nilfs2/nilfs2.o

  CC [M]  fs/befs/datastream.o

  CC [M]  fs/befs/btree.o

  CC [M]  fs/befs/super.o

  CC [M]  fs/befs/inode.o

  CC [M]  fs/befs/debug.o

  CC [M]  fs/befs/io.o

  CC [M]  fs/befs/linuxvfs.o

  LD [M]  fs/befs/befs.o

  CC [M]  fs/cachefiles/bind.o

  CC [M]  fs/cachefiles/daemon.o

  CC [M]  fs/cachefiles/interface.o

  CC [M]  fs/cachefiles/io.o

  CC [M]  fs/cachefiles/key.o

  CC [M]  fs/cachefiles/main.o

  CC [M]  fs/cachefiles/namei.o

  CC [M]  fs/cachefiles/rdwr.o

  CC [M]  fs/cachefiles/security.o

  CC [M]  fs/cachefiles/xattr.o

  LD [M]  fs/cachefiles/cachefiles.o

  CC [M]  fs/ocfs2/dlmfs/userdlm.o

  CC [M]  fs/ocfs2/dlmfs/dlmfs.o

  LD [M]  fs/ocfs2/dlmfs/ocfs2_dlmfs.o

  CC [M]  fs/ocfs2/cluster/heartbeat.o

  CC [M]  fs/ocfs2/cluster/masklog.o

  CC [M]  fs/ocfs2/cluster/sys.o

  CC [M]  fs/ocfs2/cluster/nodemanager.o

  CC [M]  fs/ocfs2/cluster/quorum.o

  CC [M]  fs/ocfs2/cluster/tcp.o

  CC [M]  fs/ocfs2/cluster/netdebug.o

  LD [M]  fs/ocfs2/cluster/ocfs2_nodemanager.o

  CC [M]  fs/ocfs2/dlm/dlmdomain.o

  CC [M]  fs/ocfs2/dlm/dlmdebug.o

  CC [M]  fs/ocfs2/dlm/dlmthread.o

  CC [M]  fs/ocfs2/dlm/dlmrecovery.o

  CC [M]  fs/ocfs2/dlm/dlmmaster.o

  CC [M]  fs/ocfs2/dlm/dlmast.o

  CC [M]  fs/ocfs2/dlm/dlmconvert.o

  CC [M]  fs/ocfs2/dlm/dlmlock.o

  CC [M]  fs/ocfs2/dlm/dlmunlock.o

  LD [M]  fs/ocfs2/dlm/ocfs2_dlm.o

  CC [M]  fs/ocfs2/alloc.o

  CC [M]  fs/ocfs2/aops.o

  CC [M]  fs/ocfs2/blockcheck.o

  CC [M]  fs/ocfs2/buffer_head_io.o

  CC [M]  fs/ocfs2/dcache.o

  CC [M]  fs/ocfs2/dir.o

  CC [M]  fs/ocfs2/dlmglue.o

  CC [M]  fs/ocfs2/export.o

  CC [M]  fs/ocfs2/extent_map.o

  CC [M]  fs/ocfs2/file.o

  CC [M]  fs/ocfs2/heartbeat.o

  CC [M]  fs/ocfs2/inode.o

  CC [M]  fs/ocfs2/ioctl.o

  CC [M]  fs/ocfs2/journal.o

  CC [M]  fs/ocfs2/localalloc.o

  CC [M]  fs/ocfs2/locks.o

  CC [M]  fs/ocfs2/mmap.o

  CC [M]  fs/ocfs2/namei.o

  CC [M]  fs/ocfs2/refcounttree.o

  CC [M]  fs/ocfs2/reservations.o

  CC [M]  fs/ocfs2/move_extents.o

  CC [M]  fs/ocfs2/resize.o

  CC [M]  fs/ocfs2/slot_map.o

  CC [M]  fs/ocfs2/suballoc.o

  CC [M]  fs/ocfs2/super.o

  CC [M]  fs/ocfs2/symlink.o

  CC [M]  fs/ocfs2/sysfile.o

  CC [M]  fs/ocfs2/uptodate.o

  CC [M]  fs/ocfs2/quota_local.o

  CC [M]  fs/ocfs2/quota_global.o

  CC [M]  fs/ocfs2/xattr.o

  CC [M]  fs/ocfs2/acl.o

  CC [M]  fs/ocfs2/filecheck.o

  LD [M]  fs/ocfs2/ocfs2.o

  CC [M]  fs/ocfs2/stackglue.o

  LD [M]  fs/ocfs2/ocfs2_stackglue.o

  CC [M]  fs/ocfs2/stack_o2cb.o

  LD [M]  fs/ocfs2/ocfs2_stack_o2cb.o

  CC [M]  fs/ocfs2/stack_user.o

  LD [M]  fs/ocfs2/ocfs2_stack_user.o

  CC [M]  fs/gfs2/acl.o

  CC [M]  fs/gfs2/bmap.o

  CC [M]  fs/gfs2/dir.o

  CC [M]  fs/gfs2/xattr.o

  CC [M]  fs/gfs2/glock.o

  CC [M]  fs/gfs2/glops.o

  CC [M]  fs/gfs2/log.o

  CC [M]  fs/gfs2/lops.o

  CC [M]  fs/gfs2/main.o

  CC [M]  fs/gfs2/meta_io.o

  CC [M]  fs/gfs2/aops.o

  CC [M]  fs/gfs2/dentry.o

  CC [M]  fs/gfs2/export.o

  CC [M]  fs/gfs2/file.o

  CC [M]  fs/gfs2/ops_fstype.o

  CC [M]  fs/gfs2/inode.o

  CC [M]  fs/gfs2/quota.o

  CC [M]  fs/gfs2/recovery.o

  CC [M]  fs/gfs2/rgrp.o

  CC [M]  fs/gfs2/super.o

  CC [M]  fs/gfs2/sys.o

  CC [M]  fs/gfs2/trans.o

  CC [M]  fs/gfs2/util.o

  CC [M]  fs/gfs2/lock_dlm.o

  LD [M]  fs/gfs2/gfs2.o

  CC [M]  fs/f2fs/dir.o

  CC [M]  fs/f2fs/file.o

  CC [M]  fs/f2fs/inode.o

  CC [M]  fs/f2fs/namei.o

  CC [M]  fs/f2fs/hash.o

  CC [M]  fs/f2fs/super.o

  CC [M]  fs/f2fs/inline.o

  CC [M]  fs/f2fs/checkpoint.o

  CC [M]  fs/f2fs/gc.o

  CC [M]  fs/f2fs/data.o

  CC [M]  fs/f2fs/node.o

  CC [M]  fs/f2fs/segment.o

  CC [M]  fs/f2fs/recovery.o

  CC [M]  fs/f2fs/shrinker.o

  CC [M]  fs/f2fs/extent_cache.o

  CC [M]  fs/f2fs/sysfs.o

  CC [M]  fs/f2fs/debug.o

  CC [M]  fs/f2fs/xattr.o

  CC [M]  fs/f2fs/acl.o

  CC [M]  fs/f2fs/verity.o

  CC [M]  fs/f2fs/compress.o

  CC [M]  fs/f2fs/iostat.o

  LD [M]  fs/f2fs/f2fs.o

  CC [M]  fs/ceph/super.o

  CC [M]  fs/ceph/inode.o

  CC [M]  fs/ceph/dir.o

  CC [M]  fs/ceph/file.o

  CC [M]  fs/ceph/locks.o

  CC [M]  fs/ceph/addr.o

  CC [M]  fs/ceph/ioctl.o

  CC [M]  fs/ceph/export.o

  CC [M]  fs/ceph/caps.o

  CC [M]  fs/ceph/snap.o

  CC [M]  fs/ceph/xattr.o

  CC [M]  fs/ceph/quota.o

  CC [M]  fs/ceph/io.o

  CC [M]  fs/ceph/mds_client.o

  CC [M]  fs/ceph/mdsmap.o

  CC [M]  fs/ceph/strings.o

  CC [M]  fs/ceph/ceph_frag.o

  CC [M]  fs/ceph/debugfs.o

  CC [M]  fs/ceph/util.o

  CC [M]  fs/ceph/metric.o

  CC [M]  fs/ceph/cache.o

  CC [M]  fs/ceph/acl.o

  LD [M]  fs/ceph/ceph.o

  CC [M]  fs/erofs/super.o

  CC [M]  fs/erofs/inode.o

  CC [M]  fs/erofs/data.o

  CC [M]  fs/erofs/namei.o

  CC [M]  fs/erofs/dir.o

  CC [M]  fs/erofs/utils.o

  CC [M]  fs/erofs/pcpubuf.o

  CC [M]  fs/erofs/xattr.o

  CC [M]  fs/erofs/decompressor.o

  CC [M]  fs/erofs/zmap.o

  CC [M]  fs/erofs/zdata.o

  LD [M]  fs/erofs/erofs.o

  CC [M]  fs/vboxsf/dir.o

  CC [M]  fs/vboxsf/file.o

  CC [M]  fs/vboxsf/utils.o

  CC [M]  fs/vboxsf/vboxsf_wrappers.o

  CC [M]  fs/vboxsf/super.o

  LD [M]  fs/vboxsf/vboxsf.o

  CC [M]  fs/zonefs/super.o

  LD [M]  fs/zonefs/zonefs.o

  CC      fs/open.o

  CC      fs/read_write.o

  CC      fs/file_table.o

  CC      fs/super.o

  CC      fs/char_dev.o

  CC      fs/stat.o

  CC      fs/exec.o

  CC      fs/pipe.o

  CC      fs/namei.o

  CC      fs/fcntl.o

  CC      fs/ioctl.o

  CC      fs/readdir.o

  CC      fs/select.o

  CC      fs/dcache.o

  CC      fs/inode.o

  CC      fs/attr.o

  CC      fs/bad_inode.o

  CC      fs/file.o

  CC      fs/filesystems.o

  CC      fs/namespace.o

  CC      fs/seq_file.o

  CC      fs/xattr.o

  CC      fs/libfs.o

  CC      fs/fs-writeback.o

  CC      fs/pnode.o

  CC      fs/splice.o

  CC      fs/sync.o

  CC      fs/utimes.o

  CC      fs/d_path.o

  CC      fs/stack.o

  CC      fs/fs_struct.o

  CC      fs/statfs.o

  CC      fs/fs_pin.o

  CC      fs/nsfs.o

  CC      fs/fs_types.o

  CC      fs/fs_context.o

  CC      fs/fs_parser.o

  CC      fs/fsopen.o

  CC      fs/init.o

  CC      fs/kernel_read_file.o

  CC      fs/remap_range.o

  CC      fs/buffer.o

  CC      fs/direct-io.o

  CC      fs/mpage.o

  CC      fs/proc_namespace.o

  CC      fs/eventpoll.o

  CC      fs/anon_inodes.o

  CC      fs/signalfd.o

  CC      fs/timerfd.o

  CC      fs/eventfd.o

  CC      fs/userfaultfd.o

  CC      fs/aio.o

  CC      fs/io_uring.o

  CC      fs/io-wq.o

  CC      fs/dax.o

  CC      fs/locks.o

  CC      fs/binfmt_script.o

  CC      fs/binfmt_elf.o

  CC      fs/compat_binfmt_elf.o

  CC      fs/mbcache.o

  CC      fs/posix_acl.o

  CC      fs/coredump.o

  CC      fs/drop_caches.o

  CC      fs/fhandle.o

  CC      fs/shiftfs.o

fs/shiftfs.c: In function ‘shiftfs_setxattr’:

fs/shiftfs.c:320:28: error: passing argument 1 of ‘vfs_setxattr’ from incompatible pointer type [-Werror=incompatible-pointer-types]

  320 |         err = vfs_setxattr(lowerd, name, value, size, flags);

      |                            ^~~~~~

      |                            |

      |                            struct dentry *

In file included from fs/shiftfs.c:19:

./include/linux/xattr.h:63:18: note: expected ‘struct user_namespace *’ but argument is of type ‘struct dentry *’

   63 | int vfs_setxattr(struct user_namespace *, struct dentry *, const char *,

      |                  ^~~~~~~~~~~~~~~~~~~~~~~

fs/shiftfs.c:320:36: error: passing argument 2 of ‘vfs_setxattr’ from incompatible pointer type [-Werror=incompatible-pointer-types]

  320 |         err = vfs_setxattr(lowerd, name, value, size, flags);

      |                                    ^~~~

      |                                    |

      |                                    const char *

In file included from fs/shiftfs.c:19:

./include/linux/xattr.h:63:43: note: expected ‘struct dentry *’ but argument is of type ‘const char *’

   63 | int vfs_setxattr(struct user_namespace *, struct dentry *, const char *,

      |                                           ^~~~~~~~~~~~~~~

fs/shiftfs.c:320:49: warning: passing argument 4 of ‘vfs_setxattr’ makes pointer from integer without a cast [-Wint-conversion]

  320 |         err = vfs_setxattr(lowerd, name, value, size, flags);

      |                                                 ^~~~

      |                                                 |

      |                                                 size_t {aka long unsigned int}

In file included from fs/shiftfs.c:19:

./include/linux/xattr.h:64:18: note: expected ‘const void *’ but argument is of type ‘size_t’ {aka ‘long unsigned int’}

   64 |                  const void *, size_t, int);

      |                  ^~~~~~~~~~~~

fs/shiftfs.c:320:15: error: too few arguments to function ‘vfs_setxattr’

  320 |         err = vfs_setxattr(lowerd, name, value, size, flags);

      |               ^~~~~~~~~~~~

In file included from fs/shiftfs.c:19:

./include/linux/xattr.h:63:5: note: declared here

   63 | int vfs_setxattr(struct user_namespace *, struct dentry *, const char *,

      |     ^~~~~~~~~~~~

fs/shiftfs.c: In function ‘shiftfs_xattr_get’:

fs/shiftfs.c:337:28: error: passing argument 1 of ‘vfs_getxattr’ from incompatible pointer type [-Werror=incompatible-pointer-types]

  337 |         err = vfs_getxattr(lowerd, name, value, size);

      |                            ^~~~~~

      |                            |

      |                            struct dentry *

In file included from fs/shiftfs.c:19:

./include/linux/xattr.h:53:22: note: expected ‘struct user_namespace *’ but argument is of type ‘struct dentry *’

   53 | ssize_t vfs_getxattr(struct user_namespace *, struct dentry *, const char *,

      |                      ^~~~~~~~~~~~~~~~~~~~~~~

fs/shiftfs.c:337:36: error: passing argument 2 of ‘vfs_getxattr’ from incompatible pointer type [-Werror=incompatible-pointer-types]

  337 |         err = vfs_getxattr(lowerd, name, value, size);

      |                                    ^~~~

      |                                    |

      |                                    const char *

In file included from fs/shiftfs.c:19:

./include/linux/xattr.h:53:47: note: expected ‘struct dentry *’ but argument is of type ‘const char *’

   53 | ssize_t vfs_getxattr(struct user_namespace *, struct dentry *, const char *,

      |                                               ^~~~~~~~~~~~~~~

fs/shiftfs.c:337:49: warning: passing argument 4 of ‘vfs_getxattr’ makes pointer from integer without a cast [-Wint-conversion]

  337 |         err = vfs_getxattr(lowerd, name, value, size);

      |                                                 ^~~~

      |                                                 |

      |                                                 size_t {aka long unsigned int}

In file included from fs/shiftfs.c:19:

./include/linux/xattr.h:54:22: note: expected ‘void *’ but argument is of type ‘size_t’ {aka ‘long unsigned int’}

   54 |                      void *, size_t);

      |                      ^~~~~~

fs/shiftfs.c:337:15: error: too few arguments to function ‘vfs_getxattr’

  337 |         err = vfs_getxattr(lowerd, name, value, size);

      |               ^~~~~~~~~~~~

In file included from fs/shiftfs.c:19:

./include/linux/xattr.h:53:9: note: declared here

   53 | ssize_t vfs_getxattr(struct user_namespace *, struct dentry *, const char *,

      |         ^~~~~~~~~~~~

fs/shiftfs.c: In function ‘shiftfs_removexattr’:

fs/shiftfs.c:364:31: error: passing argument 1 of ‘vfs_removexattr’ from incompatible pointer type [-Werror=incompatible-pointer-types]

  364 |         err = vfs_removexattr(lowerd, name);

      |                               ^~~~~~

      |                               |

      |                               struct dentry *

In file included from fs/shiftfs.c:19:

./include/linux/xattr.h:68:21: note: expected ‘struct user_namespace *’ but argument is of type ‘struct dentry *’

   68 | int vfs_removexattr(struct user_namespace *, struct dentry *, const char *);

      |                     ^~~~~~~~~~~~~~~~~~~~~~~

fs/shiftfs.c:364:39: error: passing argument 2 of ‘vfs_removexattr’ from incompatible pointer type [-Werror=incompatible-pointer-types]

  364 |         err = vfs_removexattr(lowerd, name);

      |                                       ^~~~

      |                                       |

      |                                       const char *

In file included from fs/shiftfs.c:19:

./include/linux/xattr.h:68:46: note: expected ‘struct dentry *’ but argument is of type ‘const char *’

   68 | int vfs_removexattr(struct user_namespace *, struct dentry *, const char *);

      |                                              ^~~~~~~~~~~~~~~

fs/shiftfs.c:364:15: error: too few arguments to function ‘vfs_removexattr’

  364 |         err = vfs_removexattr(lowerd, name);

      |               ^~~~~~~~~~~~~~~

In file included from fs/shiftfs.c:19:

./include/linux/xattr.h:68:5: note: declared here

   68 | int vfs_removexattr(struct user_namespace *, struct dentry *, const char *);

      |     ^~~~~~~~~~~~~~~

fs/shiftfs.c: In function ‘shiftfs_create_object’:

fs/shiftfs.c:456:34: error: passing argument 1 of ‘inode_init_owner’ from incompatible pointer type [-Werror=incompatible-pointer-types]

  456 |                 inode_init_owner(inode, diri, mode);

      |                                  ^~~~~

      |                                  |

      |                                  struct inode *

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:2011:46: note: expected ‘struct user_namespace *’ but argument is of type ‘struct inode *’

 2011 | void inode_init_owner(struct user_namespace *mnt_userns, struct inode *inode,

      |                       ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~

fs/shiftfs.c:456:47: warning: passing argument 3 of ‘inode_init_owner’ makes pointer from integer without a cast [-Wint-conversion]

  456 |                 inode_init_owner(inode, diri, mode);

      |                                               ^~~~

      |                                               |

      |                                               umode_t {aka short unsigned int}

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:2012:43: note: expected ‘const struct inode *’ but argument is of type ‘umode_t’ {aka ‘short unsigned int’}

 2012 |                       const struct inode *dir, umode_t mode);

      |                       ~~~~~~~~~~~~~~~~~~~~^~~

fs/shiftfs.c:456:17: error: too few arguments to function ‘inode_init_owner’

  456 |                 inode_init_owner(inode, diri, mode);

      |                 ^~~~~~~~~~~~~~~~

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:2011:6: note: declared here

 2011 | void inode_init_owner(struct user_namespace *mnt_userns, struct inode *inode,

      |      ^~~~~~~~~~~~~~~~

fs/shiftfs.c:467:45: error: passing argument 2 of ‘vfs_link’ from incompatible pointer type [-Werror=incompatible-pointer-types]

  467 |                 err = vfs_link(lowerd_link, loweri_dir, lowerd_new, NULL);

      |                                             ^~~~~~~~~~

      |                                             |

      |                                             struct inode *

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:1951:31: note: expected ‘struct user_namespace *’ but argument is of type ‘struct inode *’

 1951 | int vfs_link(struct dentry *, struct user_namespace *, struct inode *,

      |                               ^~~~~~~~~~~~~~~~~~~~~~~

fs/shiftfs.c:467:57: error: passing argument 3 of ‘vfs_link’ from incompatible pointer type [-Werror=incompatible-pointer-types]

  467 |                 err = vfs_link(lowerd_link, loweri_dir, lowerd_new, NULL);

      |                                                         ^~~~~~~~~~

      |                                                         |

      |                                                         struct dentry *

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:1951:56: note: expected ‘struct inode *’ but argument is of type ‘struct dentry *’

 1951 | int vfs_link(struct dentry *, struct user_namespace *, struct inode *,

      |                                                        ^~~~~~~~~~~~~~

fs/shiftfs.c:467:23: error: too few arguments to function ‘vfs_link’

  467 |                 err = vfs_link(lowerd_link, loweri_dir, lowerd_new, NULL);

      |                       ^~~~~~~~

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:1951:5: note: declared here

 1951 | int vfs_link(struct dentry *, struct user_namespace *, struct inode *,

      |     ^~~~~~~~

fs/shiftfs.c:471:41: error: passing argument 1 of ‘vfs_mkdir’ from incompatible pointer type [-Werror=incompatible-pointer-types]

  471 |                         err = vfs_mkdir(loweri_dir, lowerd_new, modei);

      |                                         ^~~~~~~~~~

      |                                         |

      |                                         struct inode *

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:1945:15: note: expected ‘struct user_namespace *’ but argument is of type ‘struct inode *’

 1945 | int vfs_mkdir(struct user_namespace *, struct inode *,

      |               ^~~~~~~~~~~~~~~~~~~~~~~

fs/shiftfs.c:471:53: error: passing argument 2 of ‘vfs_mkdir’ from incompatible pointer type [-Werror=incompatible-pointer-types]

  471 |                         err = vfs_mkdir(loweri_dir, lowerd_new, modei);

      |                                                     ^~~~~~~~~~

      |                                                     |

      |                                                     struct dentry *

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:1945:40: note: expected ‘struct inode *’ but argument is of type ‘struct dentry *’

 1945 | int vfs_mkdir(struct user_namespace *, struct inode *,

      |                                        ^~~~~~~~~~~~~~

fs/shiftfs.c:471:65: warning: passing argument 3 of ‘vfs_mkdir’ makes pointer from integer without a cast [-Wint-conversion]

  471 |                         err = vfs_mkdir(loweri_dir, lowerd_new, modei);

      |                                                                 ^~~~~

      |                                                                 |

      |                                                                 umode_t {aka short unsigned int}

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:1946:15: note: expected ‘struct dentry *’ but argument is of type ‘umode_t’ {aka ‘short unsigned int’}

 1946 |               struct dentry *, umode_t);

      |               ^~~~~~~~~~~~~~~

fs/shiftfs.c:471:31: error: too few arguments to function ‘vfs_mkdir’

  471 |                         err = vfs_mkdir(loweri_dir, lowerd_new, modei);

      |                               ^~~~~~~~~

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:1945:5: note: declared here

 1945 | int vfs_mkdir(struct user_namespace *, struct inode *,

      |     ^~~~~~~~~

fs/shiftfs.c:474:42: error: passing argument 1 of ‘vfs_create’ from incompatible pointer type [-Werror=incompatible-pointer-types]

  474 |                         err = vfs_create(loweri_dir, lowerd_new, modei, excl);

      |                                          ^~~~~~~~~~

      |                                          |

      |                                          struct inode *

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:1943:16: note: expected ‘struct user_namespace *’ but argument is of type ‘struct inode *’

 1943 | int vfs_create(struct user_namespace *, struct inode *,

      |                ^~~~~~~~~~~~~~~~~~~~~~~

fs/shiftfs.c:474:54: error: passing argument 2 of ‘vfs_create’ from incompatible pointer type [-Werror=incompatible-pointer-types]

  474 |                         err = vfs_create(loweri_dir, lowerd_new, modei, excl);

      |                                                      ^~~~~~~~~~

      |                                                      |

      |                                                      struct dentry *

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:1943:41: note: expected ‘struct inode *’ but argument is of type ‘struct dentry *’

 1943 | int vfs_create(struct user_namespace *, struct inode *,

      |                                         ^~~~~~~~~~~~~~

fs/shiftfs.c:474:66: warning: passing argument 3 of ‘vfs_create’ makes pointer from integer without a cast [-Wint-conversion]

  474 |                         err = vfs_create(loweri_dir, lowerd_new, modei, excl);

      |                                                                  ^~~~~

      |                                                                  |

      |                                                                  umode_t {aka short unsigned int}

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:1944:16: note: expected ‘struct dentry *’ but argument is of type ‘umode_t’ {aka ‘short unsigned int’}

 1944 |                struct dentry *, umode_t, bool);

      |                ^~~~~~~~~~~~~~~

fs/shiftfs.c:474:31: error: too few arguments to function ‘vfs_create’

  474 |                         err = vfs_create(loweri_dir, lowerd_new, modei, excl);

      |                               ^~~~~~~~~~

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:1943:5: note: declared here

 1943 | int vfs_create(struct user_namespace *, struct inode *,

      |     ^~~~~~~~~~

fs/shiftfs.c:477:43: error: passing argument 1 of ‘vfs_symlink’ from incompatible pointer type [-Werror=incompatible-pointer-types]

  477 |                         err = vfs_symlink(loweri_dir, lowerd_new, symlink);

      |                                           ^~~~~~~~~~

      |                                           |

      |                                           struct inode *

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:1949:17: note: expected ‘struct user_namespace *’ but argument is of type ‘struct inode *’

 1949 | int vfs_symlink(struct user_namespace *, struct inode *,

      |                 ^~~~~~~~~~~~~~~~~~~~~~~

fs/shiftfs.c:477:55: error: passing argument 2 of ‘vfs_symlink’ from incompatible pointer type [-Werror=incompatible-pointer-types]

  477 |                         err = vfs_symlink(loweri_dir, lowerd_new, symlink);

      |                                                       ^~~~~~~~~~

      |                                                       |

      |                                                       struct dentry *

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:1949:42: note: expected ‘struct inode *’ but argument is of type ‘struct dentry *’

 1949 | int vfs_symlink(struct user_namespace *, struct inode *,

      |                                          ^~~~~~~~~~~~~~

fs/shiftfs.c:477:67: error: passing argument 3 of ‘vfs_symlink’ from incompatible pointer type [-Werror=incompatible-pointer-types]

  477 |                         err = vfs_symlink(loweri_dir, lowerd_new, symlink);

      |                                                                   ^~~~~~~

      |                                                                   |

      |                                                                   const char *

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:1950:17: note: expected ‘struct dentry *’ but argument is of type ‘const char *’

 1950 |                 struct dentry *, const char *);

      |                 ^~~~~~~~~~~~~~~

fs/shiftfs.c:477:31: error: too few arguments to function ‘vfs_symlink’

  477 |                         err = vfs_symlink(loweri_dir, lowerd_new, symlink);

      |                               ^~~~~~~~~~~

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:1949:5: note: declared here

 1949 | int vfs_symlink(struct user_namespace *, struct inode *,

      |     ^~~~~~~~~~~

fs/shiftfs.c:482:41: error: passing argument 1 of ‘vfs_mknod’ from incompatible pointer type [-Werror=incompatible-pointer-types]

  482 |                         err = vfs_mknod(loweri_dir, lowerd_new, modei, 0);

      |                                         ^~~~~~~~~~

      |                                         |

      |                                         struct inode *

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:1947:15: note: expected ‘struct user_namespace *’ but argument is of type ‘struct inode *’

 1947 | int vfs_mknod(struct user_namespace *, struct inode *, struct dentry *,

      |               ^~~~~~~~~~~~~~~~~~~~~~~

fs/shiftfs.c:482:53: error: passing argument 2 of ‘vfs_mknod’ from incompatible pointer type [-Werror=incompatible-pointer-types]

  482 |                         err = vfs_mknod(loweri_dir, lowerd_new, modei, 0);

      |                                                     ^~~~~~~~~~

      |                                                     |

      |                                                     struct dentry *

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:1947:40: note: expected ‘struct inode *’ but argument is of type ‘struct dentry *’

 1947 | int vfs_mknod(struct user_namespace *, struct inode *, struct dentry *,

      |                                        ^~~~~~~~~~~~~~

fs/shiftfs.c:482:65: warning: passing argument 3 of ‘vfs_mknod’ makes pointer from integer without a cast [-Wint-conversion]

  482 |                         err = vfs_mknod(loweri_dir, lowerd_new, modei, 0);

      |                                                                 ^~~~~

      |                                                                 |

      |                                                                 umode_t {aka short unsigned int}

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:1947:56: note: expected ‘struct dentry *’ but argument is of type ‘umode_t’ {aka ‘short unsigned int’}

 1947 | int vfs_mknod(struct user_namespace *, struct inode *, struct dentry *,

      |                                                        ^~~~~~~~~~~~~~~

fs/shiftfs.c:482:31: error: too few arguments to function ‘vfs_mknod’

  482 |                         err = vfs_mknod(loweri_dir, lowerd_new, modei, 0);

      |                               ^~~~~~~~~

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:1947:5: note: declared here

 1947 | int vfs_mknod(struct user_namespace *, struct inode *, struct dentry *,

      |     ^~~~~~~~~

fs/shiftfs.c: In function ‘shiftfs_rm’:

fs/shiftfs.c:587:33: error: passing argument 1 of ‘vfs_rmdir’ from incompatible pointer type [-Werror=incompatible-pointer-types]

  587 |                 err = vfs_rmdir(loweri, lowerd);

      |                                 ^~~~~~

      |                                 |

      |                                 struct inode *

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:1953:15: note: expected ‘struct user_namespace *’ but argument is of type ‘struct inode *’

 1953 | int vfs_rmdir(struct user_namespace *, struct inode *, struct dentry *);

      |               ^~~~~~~~~~~~~~~~~~~~~~~

fs/shiftfs.c:587:41: error: passing argument 2 of ‘vfs_rmdir’ from incompatible pointer type [-Werror=incompatible-pointer-types]

  587 |                 err = vfs_rmdir(loweri, lowerd);

      |                                         ^~~~~~

      |                                         |

      |                                         struct dentry *

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:1953:40: note: expected ‘struct inode *’ but argument is of type ‘struct dentry *’

 1953 | int vfs_rmdir(struct user_namespace *, struct inode *, struct dentry *);

      |                                        ^~~~~~~~~~~~~~

fs/shiftfs.c:587:23: error: too few arguments to function ‘vfs_rmdir’

  587 |                 err = vfs_rmdir(loweri, lowerd);

      |                       ^~~~~~~~~

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:1953:5: note: declared here

 1953 | int vfs_rmdir(struct user_namespace *, struct inode *, struct dentry *);

      |     ^~~~~~~~~

fs/shiftfs.c:589:34: error: passing argument 1 of ‘vfs_unlink’ from incompatible pointer type [-Werror=incompatible-pointer-types]

  589 |                 err = vfs_unlink(loweri, lowerd, NULL);

      |                                  ^~~~~~

      |                                  |

      |                                  struct inode *

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:1954:16: note: expected ‘struct user_namespace *’ but argument is of type ‘struct inode *’

 1954 | int vfs_unlink(struct user_namespace *, struct inode *, struct dentry *,

      |                ^~~~~~~~~~~~~~~~~~~~~~~

fs/shiftfs.c:589:42: error: passing argument 2 of ‘vfs_unlink’ from incompatible pointer type [-Werror=incompatible-pointer-types]

  589 |                 err = vfs_unlink(loweri, lowerd, NULL);

      |                                          ^~~~~~

      |                                          |

      |                                          struct dentry *

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:1954:41: note: expected ‘struct inode *’ but argument is of type ‘struct dentry *’

 1954 | int vfs_unlink(struct user_namespace *, struct inode *, struct dentry *,

      |                                         ^~~~~~~~~~~~~~

fs/shiftfs.c:589:23: error: too few arguments to function ‘vfs_unlink’

  589 |                 err = vfs_unlink(loweri, lowerd, NULL);

      |                       ^~~~~~~~~~

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:1954:5: note: declared here

 1954 | int vfs_unlink(struct user_namespace *, struct inode *, struct dentry *,

      |     ^~~~~~~~~~

fs/shiftfs.c: In function ‘shiftfs_rename’:

fs/shiftfs.c:637:26: error: passing argument 1 of ‘vfs_rename’ from incompatible pointer type [-Werror=incompatible-pointer-types]

  637 |         err = vfs_rename(loweri_dir_old, lowerd_old, loweri_dir_new, lowerd_new,

      |                          ^~~~~~~~~~~~~~

      |                          |

      |                          struct inode *

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:1979:16: note: expected ‘struct renamedata *’ but argument is of type ‘struct inode *’

 1979 | int vfs_rename(struct renamedata *);

      |                ^~~~~~~~~~~~~~~~~~~

fs/shiftfs.c:637:15: error: too many arguments to function ‘vfs_rename’

  637 |         err = vfs_rename(loweri_dir_old, lowerd_old, loweri_dir_new, lowerd_new,

      |               ^~~~~~~~~~

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:1979:5: note: declared here

 1979 | int vfs_rename(struct renamedata *);

      |     ^~~~~~~~~~

fs/shiftfs.c: In function ‘shiftfs_permission’:

fs/shiftfs.c:705:34: error: passing argument 1 of ‘generic_permission’ from incompatible pointer type [-Werror=incompatible-pointer-types]

  705 |         err = generic_permission(inode, mask);

      |                                  ^~~~~

      |                                  |

      |                                  struct inode *

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:2982:24: note: expected ‘struct user_namespace *’ but argument is of type ‘struct inode *’

 2982 | int generic_permission(struct user_namespace *, struct inode *, int);

      |                        ^~~~~~~~~~~~~~~~~~~~~~~

fs/shiftfs.c:705:41: warning: passing argument 2 of ‘generic_permission’ makes pointer from integer without a cast [-Wint-conversion]

  705 |         err = generic_permission(inode, mask);

      |                                         ^~~~

      |                                         |

      |                                         int

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:2982:49: note: expected ‘struct inode *’ but argument is of type ‘int’

 2982 | int generic_permission(struct user_namespace *, struct inode *, int);

      |                                                 ^~~~~~~~~~~~~~

fs/shiftfs.c:705:15: error: too few arguments to function ‘generic_permission’

  705 |         err = generic_permission(inode, mask);

      |               ^~~~~~~~~~~~~~~~~~

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:2982:5: note: declared here

 2982 | int generic_permission(struct user_namespace *, struct inode *, int);

      |     ^~~~~~~~~~~~~~~~~~

fs/shiftfs.c:710:32: error: passing argument 1 of ‘inode_permission’ from incompatible pointer type [-Werror=incompatible-pointer-types]

  710 |         err = inode_permission(loweri, mask);

      |                                ^~~~~~

      |                                |

      |                                struct inode *

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:2981:22: note: expected ‘struct user_namespace *’ but argument is of type ‘struct inode *’

 2981 | int inode_permission(struct user_namespace *, struct inode *, int);

      |                      ^~~~~~~~~~~~~~~~~~~~~~~

fs/shiftfs.c:710:40: warning: passing argument 2 of ‘inode_permission’ makes pointer from integer without a cast [-Wint-conversion]

  710 |         err = inode_permission(loweri, mask);

      |                                        ^~~~

      |                                        |

      |                                        int

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:2981:47: note: expected ‘struct inode *’ but argument is of type ‘int’

 2981 | int inode_permission(struct user_namespace *, struct inode *, int);

      |                                               ^~~~~~~~~~~~~~

fs/shiftfs.c:710:15: error: too few arguments to function ‘inode_permission’

  710 |         err = inode_permission(loweri, mask);

      |               ^~~~~~~~~~~~~~~~

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:2981:5: note: declared here

 2981 | int inode_permission(struct user_namespace *, struct inode *, int);

      |     ^~~~~~~~~~~~~~~~

fs/shiftfs.c: In function ‘shiftfs_tmpfile’:

fs/shiftfs.c:748:37: error: passing argument 1 of ‘loweri->i_op->tmpfile’ from incompatible pointer type [-Werror=incompatible-pointer-types]

  748 |         err = loweri->i_op->tmpfile(loweri, lowerd, mode);

      |                                     ^~~~~~

      |                                     |

      |                                     struct inode *

fs/shiftfs.c:748:37: note: expected ‘struct user_namespace *’ but argument is of type ‘struct inode *’

fs/shiftfs.c:748:45: error: passing argument 2 of ‘loweri->i_op->tmpfile’ from incompatible pointer type [-Werror=incompatible-pointer-types]

  748 |         err = loweri->i_op->tmpfile(loweri, lowerd, mode);

      |                                             ^~~~~~

      |                                             |

      |                                             struct dentry *

fs/shiftfs.c:748:45: note: expected ‘struct inode *’ but argument is of type ‘struct dentry *’

fs/shiftfs.c:748:53: warning: passing argument 3 of ‘loweri->i_op->tmpfile’ makes pointer from integer without a cast [-Wint-conversion]

  748 |         err = loweri->i_op->tmpfile(loweri, lowerd, mode);

      |                                                     ^~~~

      |                                                     |

      |                                                     umode_t {aka short unsigned int}

fs/shiftfs.c:748:53: note: expected ‘struct dentry *’ but argument is of type ‘umode_t’ {aka ‘short unsigned int’}

fs/shiftfs.c:748:15: error: too few arguments to function ‘loweri->i_op->tmpfile’

  748 |         err = loweri->i_op->tmpfile(loweri, lowerd, mode);

      |               ^~~~~~

fs/shiftfs.c: In function ‘shiftfs_setattr’:

fs/shiftfs.c:764:31: error: passing argument 1 of ‘setattr_prepare’ from incompatible pointer type [-Werror=incompatible-pointer-types]

  764 |         err = setattr_prepare(dentry, attr);

      |                               ^~~~~~

      |                               |

      |                               struct dentry *

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:3446:21: note: expected ‘struct user_namespace *’ but argument is of type ‘struct dentry *’

 3446 | int setattr_prepare(struct user_namespace *, struct dentry *, struct iattr *);

      |                     ^~~~~~~~~~~~~~~~~~~~~~~

fs/shiftfs.c:764:39: error: passing argument 2 of ‘setattr_prepare’ from incompatible pointer type [-Werror=incompatible-pointer-types]

  764 |         err = setattr_prepare(dentry, attr);

      |                                       ^~~~

      |                                       |

      |                                       struct iattr *

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:3446:46: note: expected ‘struct dentry *’ but argument is of type ‘struct iattr *’

 3446 | int setattr_prepare(struct user_namespace *, struct dentry *, struct iattr *);

      |                                              ^~~~~~~~~~~~~~~

fs/shiftfs.c:764:15: error: too few arguments to function ‘setattr_prepare’

  764 |         err = setattr_prepare(dentry, attr);

      |               ^~~~~~~~~~~~~~~

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:3446:5: note: declared here

 3446 | int setattr_prepare(struct user_namespace *, struct dentry *, struct iattr *);

      |     ^~~~~~~~~~~~~~~

fs/shiftfs.c:781:29: error: passing argument 1 of ‘notify_change’ from incompatible pointer type [-Werror=incompatible-pointer-types]

  781 |         err = notify_change(lowerd, &newattr, NULL);

      |                             ^~~~~~

      |                             |

      |                             struct dentry *

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:2979:19: note: expected ‘struct user_namespace *’ but argument is of type ‘struct dentry *’

 2979 | int notify_change(struct user_namespace *, struct dentry *,

      |                   ^~~~~~~~~~~~~~~~~~~~~~~

fs/shiftfs.c:781:37: error: passing argument 2 of ‘notify_change’ from incompatible pointer type [-Werror=incompatible-pointer-types]

  781 |         err = notify_change(lowerd, &newattr, NULL);

      |                                     ^~~~~~~~

      |                                     |

      |                                     struct iattr *

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:2979:44: note: expected ‘struct dentry *’ but argument is of type ‘struct iattr *’

 2979 | int notify_change(struct user_namespace *, struct dentry *,

      |                                            ^~~~~~~~~~~~~~~

fs/shiftfs.c:781:15: error: too few arguments to function ‘notify_change’

  781 |         err = notify_change(lowerd, &newattr, NULL);

      |               ^~~~~~~~~~~~~

In file included from ./include/linux/fdtable.h:16,

                 from fs/shiftfs.c:5:

./include/linux/fs.h:2979:5: note: declared here

 2979 | int notify_change(struct user_namespace *, struct dentry *,

      |     ^~~~~~~~~~~~~

fs/shiftfs.c: At top level:

fs/shiftfs.c:998:27: error: initialization of ‘int (*)(struct user_namespace *, struct inode *, struct dentry *, umode_t)’ {aka ‘int (*)(struct user_namespace *, struct inode *, struct dentry *, short unsigned int)’} from incompatible pointer type ‘int (*)(struct inode *, struct dentry *, umode_t)’ {aka ‘int (*)(struct inode *, struct dentry *, short unsigned int)’} [-Werror=incompatible-pointer-types]

  998 |         .mkdir          = shiftfs_mkdir,

      |                           ^~~~~~~~~~~~~

fs/shiftfs.c:998:27: note: (near initialization for ‘shiftfs_dir_inode_operations.mkdir’)

fs/shiftfs.c:999:27: error: initialization of ‘int (*)(struct user_namespace *, struct inode *, struct dentry *, const char *)’ from incompatible pointer type ‘int (*)(struct inode *, struct dentry *, const char *)’ [-Werror=incompatible-pointer-types]

  999 |         .symlink        = shiftfs_symlink,

      |                           ^~~~~~~~~~~~~~~

fs/shiftfs.c:999:27: note: (near initialization for ‘shiftfs_dir_inode_operations.symlink’)

fs/shiftfs.c:1002:27: error: initialization of ‘int (*)(struct user_namespace *, struct inode *, struct dentry *, struct inode *, struct dentry *, unsigned int)’ from incompatible pointer type ‘int (*)(struct inode *, struct dentry *, struct inode *, struct dentry *, unsigned int)’ [-Werror=incompatible-pointer-types]

 1002 |         .rename         = shiftfs_rename,

      |                           ^~~~~~~~~~~~~~

fs/shiftfs.c:1002:27: note: (near initialization for ‘shiftfs_dir_inode_operations.rename’)

fs/shiftfs.c:1004:27: error: initialization of ‘int (*)(struct user_namespace *, struct dentry *, struct iattr *)’ from incompatible pointer type ‘int (*)(struct dentry *, struct iattr *)’ [-Werror=incompatible-pointer-types]

 1004 |         .setattr        = shiftfs_setattr,

      |                           ^~~~~~~~~~~~~~~

fs/shiftfs.c:1004:27: note: (near initialization for ‘shiftfs_dir_inode_operations.setattr’)

fs/shiftfs.c:1005:27: error: initialization of ‘int (*)(struct user_namespace *, struct inode *, struct dentry *, umode_t,  bool)’ {aka ‘int (*)(struct user_namespace *, struct inode *, struct dentry *, short unsigned int,  _Bool)’} from incompatible pointer type ‘int (*)(struct inode *, struct dentry *, umode_t,  bool)’ {aka ‘int (*)(struct inode *, struct dentry *, short unsigned int,  _Bool)’} [-Werror=incompatible-pointer-types]

 1005 |         .create         = shiftfs_create,

      |                           ^~~~~~~~~~~~~~

fs/shiftfs.c:1005:27: note: (near initialization for ‘shiftfs_dir_inode_operations.create’)

fs/shiftfs.c:1006:27: error: initialization of ‘int (*)(struct user_namespace *, struct inode *, struct dentry *, umode_t,  dev_t)’ {aka ‘int (*)(struct user_namespace *, struct inode *, struct dentry *, short unsigned int,  unsigned int)’} from incompatible pointer type ‘int (*)(struct inode *, struct dentry *, umode_t,  dev_t)’ {aka ‘int (*)(struct inode *, struct dentry *, short unsigned int,  unsigned int)’} [-Werror=incompatible-pointer-types]

 1006 |         .mknod          = shiftfs_mknod,

      |                           ^~~~~~~~~~~~~

fs/shiftfs.c:1006:27: note: (near initialization for ‘shiftfs_dir_inode_operations.mknod’)

fs/shiftfs.c:1007:27: error: initialization of ‘int (*)(struct user_namespace *, struct inode *, int)’ from incompatible pointer type ‘int (*)(struct inode *, int)’ [-Werror=incompatible-pointer-types]

 1007 |         .permission     = shiftfs_permission,

      |                           ^~~~~~~~~~~~~~~~~~

fs/shiftfs.c:1007:27: note: (near initialization for ‘shiftfs_dir_inode_operations.permission’)

fs/shiftfs.c:1008:27: error: initialization of ‘int (*)(struct user_namespace *, const struct path *, struct kstat *, u32,  unsigned int)’ {aka ‘int (*)(struct user_namespace *, const struct path *, struct kstat *, unsigned int,  unsigned int)’} from incompatible pointer type ‘int (*)(const struct path *, struct kstat *, u32,  unsigned int)’ {aka ‘int (*)(const struct path *, struct kstat *, unsigned int,  unsigned int)’} [-Werror=incompatible-pointer-types]

 1008 |         .getattr        = shiftfs_getattr,

      |                           ^~~~~~~~~~~~~~~

fs/shiftfs.c:1008:27: note: (near initialization for ‘shiftfs_dir_inode_operations.getattr’)

fs/shiftfs.c:1015:27: error: initialization of ‘int (*)(struct user_namespace *, const struct path *, struct kstat *, u32,  unsigned int)’ {aka ‘int (*)(struct user_namespace *, const struct path *, struct kstat *, unsigned int,  unsigned int)’} from incompatible pointer type ‘int (*)(const struct path *, struct kstat *, u32,  unsigned int)’ {aka ‘int (*)(const struct path *, struct kstat *, unsigned int,  unsigned int)’} [-Werror=incompatible-pointer-types]

 1015 |         .getattr        = shiftfs_getattr,

      |                           ^~~~~~~~~~~~~~~

fs/shiftfs.c:1015:27: note: (near initialization for ‘shiftfs_file_inode_operations.getattr’)

fs/shiftfs.c:1018:27: error: initialization of ‘int (*)(struct user_namespace *, struct inode *, int)’ from incompatible pointer type ‘int (*)(struct inode *, int)’ [-Werror=incompatible-pointer-types]

 1018 |         .permission     = shiftfs_permission,

      |                           ^~~~~~~~~~~~~~~~~~

fs/shiftfs.c:1018:27: note: (near initialization for ‘shiftfs_file_inode_operations.permission’)

fs/shiftfs.c:1019:27: error: initialization of ‘int (*)(struct user_namespace *, struct dentry *, struct iattr *)’ from incompatible pointer type ‘int (*)(struct dentry *, struct iattr *)’ [-Werror=incompatible-pointer-types]

 1019 |         .setattr        = shiftfs_setattr,

      |                           ^~~~~~~~~~~~~~~

fs/shiftfs.c:1019:27: note: (near initialization for ‘shiftfs_file_inode_operations.setattr’)

fs/shiftfs.c:1020:27: error: initialization of ‘int (*)(struct user_namespace *, struct inode *, struct dentry *, umode_t)’ {aka ‘int (*)(struct user_namespace *, struct inode *, struct dentry *, short unsigned int)’} from incompatible pointer type ‘int (*)(struct inode *, struct dentry *, umode_t)’ {aka ‘int (*)(struct inode *, struct dentry *, short unsigned int)’} [-Werror=incompatible-pointer-types]

 1020 |         .tmpfile        = shiftfs_tmpfile,

      |                           ^~~~~~~~~~~~~~~

fs/shiftfs.c:1020:27: note: (near initialization for ‘shiftfs_file_inode_operations.tmpfile’)

fs/shiftfs.c:1024:27: error: initialization of ‘int (*)(struct user_namespace *, const struct path *, struct kstat *, u32,  unsigned int)’ {aka ‘int (*)(struct user_namespace *, const struct path *, struct kstat *, unsigned int,  unsigned int)’} from incompatible pointer type ‘int (*)(const struct path *, struct kstat *, u32,  unsigned int)’ {aka ‘int (*)(const struct path *, struct kstat *, unsigned int,  unsigned int)’} [-Werror=incompatible-pointer-types]

 1024 |         .getattr        = shiftfs_getattr,

      |                           ^~~~~~~~~~~~~~~

fs/shiftfs.c:1024:27: note: (near initialization for ‘shiftfs_special_inode_operations.getattr’)

fs/shiftfs.c:1027:27: error: initialization of ‘int (*)(struct user_namespace *, struct inode *, int)’ from incompatible pointer type ‘int (*)(struct inode *, int)’ [-Werror=incompatible-pointer-types]

 1027 |         .permission     = shiftfs_permission,

      |                           ^~~~~~~~~~~~~~~~~~

fs/shiftfs.c:1027:27: note: (near initialization for ‘shiftfs_special_inode_operations.permission’)

fs/shiftfs.c:1028:27: error: initialization of ‘int (*)(struct user_namespace *, struct dentry *, struct iattr *)’ from incompatible pointer type ‘int (*)(struct dentry *, struct iattr *)’ [-Werror=incompatible-pointer-types]

 1028 |         .setattr        = shiftfs_setattr,

      |                           ^~~~~~~~~~~~~~~

fs/shiftfs.c:1028:27: note: (near initialization for ‘shiftfs_special_inode_operations.setattr’)

fs/shiftfs.c:1032:27: error: initialization of ‘int (*)(struct user_namespace *, const struct path *, struct kstat *, u32,  unsigned int)’ {aka ‘int (*)(struct user_namespace *, const struct path *, struct kstat *, unsigned int,  unsigned int)’} from incompatible pointer type ‘int (*)(const struct path *, struct kstat *, u32,  unsigned int)’ {aka ‘int (*)(const struct path *, struct kstat *, unsigned int,  unsigned int)’} [-Werror=incompatible-pointer-types]

 1032 |         .getattr        = shiftfs_getattr,

      |                           ^~~~~~~~~~~~~~~

fs/shiftfs.c:1032:27: note: (near initialization for ‘shiftfs_symlink_inode_operations.getattr’)

fs/shiftfs.c:1035:27: error: initialization of ‘int (*)(struct user_namespace *, struct dentry *, struct iattr *)’ from incompatible pointer type ‘int (*)(struct dentry *, struct iattr *)’ [-Werror=incompatible-pointer-types]

 1035 |         .setattr        = shiftfs_setattr,

      |                           ^~~~~~~~~~~~~~~

fs/shiftfs.c:1035:27: note: (near initialization for ‘shiftfs_symlink_inode_operations.setattr’)

fs/shiftfs.c: In function ‘shiftfs_btrfs_ioctl_fd_restore’:

fs/shiftfs.c:1423:9: error: implicit declaration of function ‘__close_fd’; did you mean ‘close_fd’? [-Werror=implicit-function-declaration]

 1423 |         __close_fd(current->files, fd);

      |         ^~~~~~~~~~

      |         close_fd

fs/shiftfs.c: At top level:

fs/shiftfs.c:1856:19: error: initialization of ‘int (*)(const struct xattr_handler *, struct user_namespace *, struct dentry *, struct inode *, const char *, const void *, size_t,  int)’ {aka ‘int (*)(const struct xattr_handler *, struct user_namespace *, struct dentry *, struct inode *, const char *, const void *, long unsigned int,  int)’} from incompatible pointer type ‘int (*)(const struct xattr_handler *, struct dentry *, struct inode *, const char *, const void *, size_t,  int)’ {aka ‘int (*)(const struct xattr_handler *, struct dentry *, struct inode *, const char *, const void *, long unsigned int,  int)’} [-Werror=incompatible-pointer-types]

 1856 |         .set    = shiftfs_xattr_set,

      |                   ^~~~~~~~~~~~~~~~~

fs/shiftfs.c:1856:19: note: (near initialization for ‘shiftfs_xattr_handler.set’)

cc1: some warnings being treated as errors

make[1]: *** [scripts/Makefile.build:277: fs/shiftfs.o] Error 1

make: *** [Makefile:1868: fs] Error 2

gentoo /usr/src/linux # 
```

----------

## Hu

The shiftfs patch you used is not compatible with the kernel sources you used.  That causes your build to fail.  Next time, when you report problems compiling a kernel, please either use a kernel as-released or explicitly note that you have local patches in effect.

----------

