net/sunrpc/clnt.c compilation error: tk_pid field

From: Miles Bader
Date: Fri Oct 10 2003 - 03:41:59 EST


With linux-2.6.0-test7, I get compilation errors like:

CC net/sunrpc/clnt.o
net/sunrpc/clnt.c:965: structure has no member named `tk_pid'
net/sunrpc/clnt.c:970: structure has no member named `tk_pid'
net/sunrpc/clnt.c:976: structure has no member named `tk_pid'
make[2]: *** [net/sunrpc/clnt.o] Error 1

The reason seems to be that the tk_pid field is only included in
`struct rpc_task' (defined in include/linux/sunrpc/sched.h) if
DEBUG_RPC is defined, and DEBUG_RPC is only defined if CONFIG_SYSCTL
is defined (include/linux/sunrpc/debug.h). I've enabled NFS, but not
CONFIG_SYSCTL:

$ egrep '(SYSCTL|NFS|RPC)' .config
# CONFIG_SYSCTL is not set
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
CONFIG_NFS_V4=y
# CONFIG_NFSD is not set
CONFIG_SUNRPC=y
CONFIG_SUNRPC_GSS=y

Most code in net/sunrpc only references the tk_pid field inside of calls
to `dprintk', which is a macro that does nothing unless DEBUG_RPC is
defined; however the three lines mentioned in the error messages above
use ordinary printks, and so don't compile unless DEBUG_RPC is defined.
Perhaps these three lines should also use dprintk.

-Miles
--
`Life is a boundless sea of bitterness'
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/