Skip to content

[Linux 4.19] error: passing argument 1 of 'refcount_inc' in blkcg_cgwb_get and blkcg_cgwb_put #7885

@hphilm

Description

@hphilm

System information

Type Version/Name
Distribution Name Manjaro
Distribution Version 18.0-beta
Linux Kernel 4.19-rc3+
Architecture x86_64
ZFS Version 0.7.10
SPL Version 0.7.10

Describe the problem you're observing

torvalds/linux@59b5771 introduced following error: passing argument 1 of 'refcount_inc' from incompatible pointer type [-Werror=incompatible-pointer-types] refcount_inc(&blkcg->cgwb_refcnt);

Describe how to reproduce the problem

Try to compile zfs with 4.19-rc3 and higher

Include any warning/errors/backtraces from the system logs

  CC [M]  spl_zfs/src/zfs-0.7.10/module/icp/core/kcf_callprov.o
In file included from ./include/linux/backing-dev.h:17,
                 from spl_zfs/src/zfs-0.7.10/include/linux/blkdev_compat.h:34,
                 from spl_zfs/src/zfs-0.7.10/include/sys/dmu.h:759,
                 from spl_zfs/src/zfs-0.7.10/module/zpios/pios.c:37:
./include/linux/blk-cgroup.h: In function 'blkcg_cgwb_get':
In file included from ./include/linux/backing-dev.h:17,
                 from spl_zfs/src/zfs-0.7.10/include/linux/blkdev_compat.h:34,
                 from spl_zfs/src/zfs-0.7.10/include/sys/dmu.h:759,
                 from spl_zfs/src/zfs-0.7.10/include/sys/dsl_deleg.h:29,
                 from spl_zfs/src/zfs-0.7.10/module/zcommon/zfs_deleg.c:41:
./include/linux/blk-cgroup.h: In function 'blkcg_cgwb_get':
./include/linux/blk-cgroup.h:402:15: error: passing argument 1 of 'refcount_inc' from incompatible pointer type [-Werror=incompatible-pointer-types]
  refcount_inc(&blkcg->cgwb_refcnt);
               ^~~~~~~~~~~~~~~~~~~
./include/linux/blk-cgroup.h:402:15: error: passing argument 1 of 'refcount_inc' from incompatible pointer type [-Werror=incompatible-pointer-types]
  refcount_inc(&blkcg->cgwb_refcnt);
               ^~~~~~~~~~~~~~~~~~~
In file included from ./include/linux/refcount.h:72,
                 from ./include/linux/kref.h:19,
                 from ./include/linux/kobject.h:23,
                 from ./include/linux/module.h:17,
                 from spl_zfs/src/spl-spl-0.7.10/include/sys/sysmacros.h:28,
                 from spl_zfs/src/spl-spl-0.7.10/include/sys/types.h:29,
                 from spl_zfs/src/zfs-0.7.10/include/sys/zfs_context.h:34,
                 from spl_zfs/src/zfs-0.7.10/module/zcommon/zfs_deleg.c:28:
./arch/x86/include/asm/refcount.h:51:54: note: expected 'refcount_t *' {aka 'struct refcount_struct *'} but argument is of type 'zfs_refcount_t *' {aka 'struct refcount *'}
 static __always_inline void refcount_inc(refcount_t *r)
                                          ~~~~~~~~~~~~^
In file included from ./include/linux/refcount.h:72,
                 from ./include/linux/kref.h:19,
                 from ./include/linux/kobject.h:23,
                 from ./include/linux/module.h:17,
                 from spl_zfs/src/spl-spl-0.7.10/include/sys/sysmacros.h:28,
                 from spl_zfs/src/spl-spl-0.7.10/include/sys/types.h:29,
                 from spl_zfs/src/zfs-0.7.10/include/sys/zfs_context.h:34,
                 from spl_zfs/src/zfs-0.7.10/module/zpios/pios.c:36:
./arch/x86/include/asm/refcount.h:51:54: note: expected 'refcount_t *' {aka 'struct refcount_struct *'} but argument is of type 'zfs_refcount_t *' {aka 'struct refcount *'}
 static __always_inline void refcount_inc(refcount_t *r)
                                          ~~~~~~~~~~~~^
In file included from ./include/linux/backing-dev.h:17,
                 from spl_zfs/src/zfs-0.7.10/include/linux/blkdev_compat.h:34,
                 from spl_zfs/src/zfs-0.7.10/include/sys/dmu.h:759,
                 from spl_zfs/src/zfs-0.7.10/module/zpios/pios.c:37:
./include/linux/blk-cgroup.h: In function 'blkcg_cgwb_put':
In file included from ./include/linux/backing-dev.h:17,
                 from spl_zfs/src/zfs-0.7.10/include/linux/blkdev_compat.h:34,
                 from spl_zfs/src/zfs-0.7.10/include/sys/dmu.h:759,
                 from spl_zfs/src/zfs-0.7.10/include/sys/dsl_deleg.h:29,
                 from spl_zfs/src/zfs-0.7.10/module/zcommon/zfs_deleg.c:41:
./include/linux/blk-cgroup.h: In function 'blkcg_cgwb_put':
./include/linux/blk-cgroup.h:417:28: error: passing argument 1 of 'refcount_dec_and_test' from incompatible pointer type [-Werror=incompatible-pointer-types]
  if (refcount_dec_and_test(&blkcg->cgwb_refcnt))
                            ^~~~~~~~~~~~~~~~~~~
./include/linux/blk-cgroup.h:417:28: error: passing argument 1 of 'refcount_dec_and_test' from incompatible pointer type [-Werror=incompatible-pointer-types]
  if (refcount_dec_and_test(&blkcg->cgwb_refcnt))
                            ^~~~~~~~~~~~~~~~~~~
In file included from ./include/linux/refcount.h:72,
                 from ./include/linux/kref.h:19,
                 from ./include/linux/kobject.h:23,
                 from ./include/linux/module.h:17,
                 from spl_zfs/src/spl-spl-0.7.10/include/sys/sysmacros.h:28,
                 from spl_zfs/src/spl-spl-0.7.10/include/sys/types.h:29,
                 from spl_zfs/src/zfs-0.7.10/include/sys/zfs_context.h:34,
                 from spl_zfs/src/zfs-0.7.10/module/zpios/pios.c:36:
./arch/x86/include/asm/refcount.h:74:76: note: expected 'refcount_t *' {aka 'struct refcount_struct *'} but argument is of type 'zfs_refcount_t *' {aka 'struct refcount *'}
 static __always_inline __must_check bool refcount_dec_and_test(refcount_t *r)
                                                                ~~~~~~~~~~~~^
In file included from ./include/linux/refcount.h:72,
                 from ./include/linux/kref.h:19,
                 from ./include/linux/kobject.h:23,
                 from ./include/linux/module.h:17,
                 from spl_zfs/src/spl-spl-0.7.10/include/sys/sysmacros.h:28,
                 from spl_zfs/src/spl-spl-0.7.10/include/sys/types.h:29,
                 from spl_zfs/src/zfs-0.7.10/include/sys/zfs_context.h:34,
                 from spl_zfs/src/zfs-0.7.10/module/zcommon/zfs_deleg.c:28:
./arch/x86/include/asm/refcount.h:74:76: note: expected 'refcount_t *' {aka 'struct refcount_struct *'} but argument is of type 'zfs_refcount_t *' {aka 'struct refcount *'}
 static __always_inline __must_check bool refcount_dec_and_test(refcount_t *r)
                                                                ~~~~~~~~~~~~^
In file included from ./include/linux/backing-dev.h:17,
                 from spl_zfs/src/zfs-0.7.10/include/linux/blkdev_compat.h:34,
                 from spl_zfs/src/zfs-0.7.10/include/sys/dmu.h:759,
                 from spl_zfs/src/zfs-0.7.10/include/sys/spa.h:43,
                 from spl_zfs/src/zfs-0.7.10/include/sys/zio.h:36,
                 from spl_zfs/src/zfs-0.7.10/module/zcommon/zfs_prop.c:30:
./include/linux/blk-cgroup.h: In function 'blkcg_cgwb_get':
./include/linux/blk-cgroup.h:402:15: error: passing argument 1 of 'refcount_inc' from incompatible pointer type [-Werror=incompatible-pointer-types]
  refcount_inc(&blkcg->cgwb_refcnt);
               ^~~~~~~~~~~~~~~~~~~
In file included from ./include/linux/refcount.h:72,
                 from ./include/linux/kref.h:19,
                 from ./include/linux/kobject.h:23,
                 from ./include/linux/module.h:17,
                 from spl_zfs/src/spl-spl-0.7.10/include/sys/sysmacros.h:28,
                 from spl_zfs/src/spl-spl-0.7.10/include/sys/types.h:29,
                 from spl_zfs/src/zfs-0.7.10/include/sys/zfs_context.h:34,
                 from spl_zfs/src/zfs-0.7.10/include/sys/zio.h:35,
                 from spl_zfs/src/zfs-0.7.10/module/zcommon/zfs_prop.c:30:
./arch/x86/include/asm/refcount.h:51:54: note: expected 'refcount_t *' {aka 'struct refcount_struct *'} but argument is of type 'zfs_refcount_t *' {aka 'struct refcount *'}
 static __always_inline void refcount_inc(refcount_t *r)
                                          ~~~~~~~~~~~~^
In file included from ./include/linux/backing-dev.h:17,
                 from spl_zfs/src/zfs-0.7.10/include/linux/blkdev_compat.h:34,
                 from spl_zfs/src/zfs-0.7.10/include/sys/dmu.h:759,
                 from spl_zfs/src/zfs-0.7.10/include/sys/spa.h:43,
                 from spl_zfs/src/zfs-0.7.10/include/sys/zio.h:36,
                 from spl_zfs/src/zfs-0.7.10/module/zcommon/zfs_prop.c:30:
./include/linux/blk-cgroup.h: In function 'blkcg_cgwb_put':
./include/linux/blk-cgroup.h:417:28: error: passing argument 1 of 'refcount_dec_and_test' from incompatible pointer type [-Werror=incompatible-pointer-types]
  if (refcount_dec_and_test(&blkcg->cgwb_refcnt))
                            ^~~~~~~~~~~~~~~~~~~
In file included from ./include/linux/refcount.h:72,
                 from ./include/linux/kref.h:19,
                 from ./include/linux/kobject.h:23,
                 from ./include/linux/module.h:17,
                 from spl_zfs/src/spl-spl-0.7.10/include/sys/sysmacros.h:28,
                 from spl_zfs/src/spl-spl-0.7.10/include/sys/types.h:29,
                 from spl_zfs/src/zfs-0.7.10/include/sys/zfs_context.h:34,
                 from spl_zfs/src/zfs-0.7.10/include/sys/zio.h:35,
                 from spl_zfs/src/zfs-0.7.10/module/zcommon/zfs_prop.c:30:
./arch/x86/include/asm/refcount.h:74:76: note: expected 'refcount_t *' {aka 'struct refcount_struct *'} but argument is of type 'zfs_refcount_t *' {aka 'struct refcount *'}
 static __always_inline __must_check bool refcount_dec_and_test(refcount_t *r)
                                                                ~~~~~~~~~~~~^
In file included from ./include/linux/backing-dev.h:17,
                 from spl_zfs/src/zfs-0.7.10/include/linux/blkdev_compat.h:34,
                 from spl_zfs/src/zfs-0.7.10/include/sys/dmu.h:759,
                 from spl_zfs/src/zfs-0.7.10/include/sys/spa.h:43,
                 from spl_zfs/src/zfs-0.7.10/include/sys/zio.h:36,
                 from spl_zfs/src/zfs-0.7.10/module/zfs/abd.c:119:
./include/linux/blk-cgroup.h: In function 'blkcg_cgwb_get':
./include/linux/blk-cgroup.h:402:15: error: passing argument 1 of 'refcount_inc' from incompatible pointer type [-Werror=incompatible-pointer-types]
  refcount_inc(&blkcg->cgwb_refcnt);
               ^~~~~~~~~~~~~~~~~~~
In file included from ./include/linux/refcount.h:72,
                 from ./include/linux/kref.h:19,
                 from ./include/linux/kobject.h:23,
                 from ./include/linux/module.h:17,
                 from spl_zfs/src/spl-spl-0.7.10/include/sys/sysmacros.h:28,
                 from spl_zfs/src/spl-spl-0.7.10/include/sys/types.h:29,
                 from spl_zfs/src/spl-spl-0.7.10/include/sys/list.h:28,
                 from spl_zfs/src/zfs-0.7.10/include/sys/refcount.h:30,
                 from spl_zfs/src/zfs-0.7.10/include/sys/abd.h:32,
                 from spl_zfs/src/zfs-0.7.10/module/zfs/abd.c:117:
./arch/x86/include/asm/refcount.h:51:54: note: expected 'refcount_t *' {aka 'struct refcount_struct *'} but argument is of type 'zfs_refcount_t *' {aka 'struct refcount *'}
 static __always_inline void refcount_inc(refcount_t *r)
                                          ~~~~~~~~~~~~^
In file included from ./include/linux/backing-dev.h:17,
                 from spl_zfs/src/zfs-0.7.10/include/linux/blkdev_compat.h:34,
                 from spl_zfs/src/zfs-0.7.10/include/sys/dmu.h:759,
                 from spl_zfs/src/zfs-0.7.10/include/sys/spa.h:43,
                 from spl_zfs/src/zfs-0.7.10/include/sys/zio.h:36,
                 from spl_zfs/src/zfs-0.7.10/module/zfs/abd.c:119:
./include/linux/blk-cgroup.h: In function 'blkcg_cgwb_put':
./include/linux/blk-cgroup.h:417:28: error: passing argument 1 of 'refcount_dec_and_test' from incompatible pointer type [-Werror=incompatible-pointer-types]
  if (refcount_dec_and_test(&blkcg->cgwb_refcnt))
                            ^~~~~~~~~~~~~~~~~~~
In file included from ./include/linux/refcount.h:72,
                 from ./include/linux/kref.h:19,
                 from ./include/linux/kobject.h:23,
                 from ./include/linux/module.h:17,
                 from spl_zfs/src/spl-spl-0.7.10/include/sys/sysmacros.h:28,
                 from spl_zfs/src/spl-spl-0.7.10/include/sys/types.h:29,
                 from spl_zfs/src/spl-spl-0.7.10/include/sys/list.h:28,
                 from spl_zfs/src/zfs-0.7.10/include/sys/refcount.h:30,
                 from spl_zfs/src/zfs-0.7.10/include/sys/abd.h:32,
                 from spl_zfs/src/zfs-0.7.10/module/zfs/abd.c:117:
./arch/x86/include/asm/refcount.h:74:76: note: expected 'refcount_t *' {aka 'struct refcount_struct *'} but argument is of type 'zfs_refcount_t *' {aka 'struct refcount *'}
 static __always_inline __must_check bool refcount_dec_and_test(refcount_t *r)
                                                                ~~~~~~~~~~~~^
  CC [M]  spl_zfs/src/zfs-0.7.10/module/icp/core/kcf_prov_tabs.o
cc1: some warnings being treated as errors
  LD [M]  spl_zfs/src/zfs-0.7.10/module/avl/zavl.o
make[5]: *** [scripts/Makefile.build:306: spl_zfs/src/zfs-0.7.10/module/zcommon/zfs_deleg.o] Error 1
make[5]: *** Waiting for unfinished jobs....
  CC [M]  spl_zfs/src/zfs-0.7.10/module/zcommon/zprop_common.o
  CC [M]  spl_zfs/src/zfs-0.7.10/module/zfs/arc.o
cc1: some warnings being treated as errors
make[5]: *** [scripts/Makefile.build:306: spl_zfs/src/zfs-0.7.10/module/zcommon/zfs_prop.o] Error 1
  CC [M]  spl_zfs/src/zfs-0.7.10/module/zfs/blkptr.o
  CC [M]  spl_zfs/src/zfs-0.7.10/module/icp/core/kcf_sched.o
cc1: some warnings being treated as errors
cc1: some warnings being treated as errors
make[5]: *** [scripts/Makefile.build:306: spl_zfs/src/zfs-0.7.10/module/zpios/pios.o] Error 1
make[4]: *** [scripts/Makefile.build:546: spl_zfs/src/zfs-0.7.10/module/zpios] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BuildingIndicates an issue related to building binaries

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions