Details
-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
None
-
3
-
9223372036854775807
Description
When lockdep is enabled, the Xarray header cannot be compiled due to const qualification errors:
CC [M] /root/lustre-release/libcfs/libcfs/linux/xarray.o
In file included from /root/lustre-release/libcfs/libcfs/linux/xarray.c:19:0:
/root/lustre-release/libcfs/include/libcfs/linux/xarray.h: In function ‘xa_head’:
/root/lustre-release/libcfs/include/libcfs/linux/xarray.h:1135:2: error: passing argument 1 of ‘lock_is_held’ discards ‘const’ qualifier from pointer target type [-Werror]
return rcu_dereference_check(xa->xa_head,
^
In file included from include/linux/spinlock_types.h:18:0,
from include/linux/spinlock.h:81,
from include/linux/mmzone.h:7,
from include/linux/gfp.h:5,
from include/linux/slab.h:12,
from /root/lustre-release/libcfs/libcfs/linux/xarray.c:17:
include/linux/lockdep.h:340:19: note: expected ‘struct lockdep_map *’ but argument is of type ‘const struct lockdep_map *’
static inline int lock_is_held(struct lockdep_map *lock)
^