This works around a problem (fixed in 2.6.30) where unloading the ipv6.ko module causes mount.nfs4 to fail with "Cannot allocate memory." SUNRPC_REGISTER_V4 is required for AF_INET6 support in NFS and lockd. If V4 rpcbind registration support isn't available in the kernel, lockd uses AF_INET only. NFSv4 callback does not register with rpcbind, so it doesn't care what flavor of rpcbind registration is available in the kernel. For 2.6.29 we decided to use SUNRPC_REGISTER_V4 to disable IPv6 support in NFS and lockd to work around the requirement that ipv6.ko be loaded. But I forgot that the NFSv4 callback service would still try to start an AF_INET6 listener even if SUNRPC_REGISTER_V4 is disabled. Tested-by: Andrew Savchenko <bircoph@xxxxxxxxx> Signed-off-by: Chuck Lever <chuck.lever@xxxxxxxxxx> --- Hi Trond- Would you consider this patch for 2.6.29-stable? fs/nfs/callback.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c index 3e634f2..b59a614 100644 --- a/fs/nfs/callback.c +++ b/fs/nfs/callback.c @@ -45,7 +45,8 @@ static const int nfs_set_port_max = 65535; * If the kernel has IPv6 support available, always listen for * both AF_INET and AF_INET6 requests. */ -#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) +#if (defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)) && \ + defined(CONFIG_SUNRPC_REGISTER_V4) static const sa_family_t nfs_callback_family = AF_INET6; #else static const sa_family_t nfs_callback_family = AF_INET; -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html