Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-17027

missing #include <linux/file.h> in lustre/target/tgt_mount.c

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • Lustre 2.16.0
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      commit "ac0380dc51 LU-137 osd-ldiskfs: pass through resize ioctl" introduces alloc_file_pseudo() to lustre/target/tgt_mount.c which needs to inclucde <linux/file.h> for 4.19 kernel.

      4.19.90 kernel build fails:

      make[3]: Entering directory '/usr/src/kernels/4.19.90-2308.1.0.0212.oe1.aarch64'
        CC [M]  /home/openeuler/lustre-release/lustre/ptlrpc/../../lustre/target/tgt_mount.o
      /home/openeuler/lustre-release/lustre/ptlrpc/../../lustre/target/tgt_mount.c: In function ‘server_ioctl’:
      /home/openeuler/lustre-release/lustre/ptlrpc/../../lustre/target/tgt_mount.c:1971:14: error: implicit declaration of function ‘alloc_file_pseudo’; did you mean ‘alloc_pipe_info’? [-Werror=implicit-function-declaration]
        root_filp = alloc_file_pseudo(root_inode, root_mnt, "/",
                    ^~~~~~~~~~~~~~~~~
                    alloc_pipe_info
      /home/openeuler/lustre-release/lustre/ptlrpc/../../lustre/target/tgt_mount.c:1971:12: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
        root_filp = alloc_file_pseudo(root_inode, root_mnt, "/",
                  ^
      /home/openeuler/lustre-release/lustre/ptlrpc/../../lustre/target/tgt_mount.c:1975:2: error: implicit declaration of function ‘fput’; did you mean ‘iput’? [-Werror=implicit-function-declaration]
        fput(root_filp);
        ^~~~
        iput
      /home/openeuler/lustre-release/lustre/ptlrpc/../../lustre/target/tgt_mount.c: At top level:
      cc1: warning: unrecognized command line option ‘-Wno-stringop-truncation’
      cc1: some warnings being treated as errors
      make[6]: *** [scripts/Makefile.build:304: /home/openeuler/lustre-release/lustre/ptlrpc/../../lustre/target/tgt_mount.o] Error 1
      make[5]: *** [scripts/Makefile.build:544: /home/openeuler/lustre-release/lustre/ptlrpc] Error 2
      make[4]: *** [scripts/Makefile.build:544: /home/openeuler/lustre-release/lustre] Error 2
      make[3]: *** [Makefile:1524: _module_/home/openeuler/lustre-release] Error 2
      make[3]: Leaving directory '/usr/src/kernels/4.19.90-2308.1.0.0212.oe1.aarch64'
      make[2]: *** [autoMakefile:1167: modules] Error 2
      make[2]: Leaving directory '/home/openeuler/lustre-release'
      make[1]: *** [autoMakefile:704: all-recursive] Error 1
      make[1]: Leaving directory '/home/openeuler/lustre-release'
      make: *** [autoMakefile:568: all] Error 2
      [openeuler@oe2003-test lustre-release]$  

      Attachments

        Issue Links

          Activity

            People

              xinliang Xinliang Liu
              xinliang Xinliang Liu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: