Merge branch 'for-3.5' of git://linux-nfs.org/~bfields/linux

Pull two nfsd bugfixes from J. Bruce Fields.

* 'for-3.5' of git://linux-nfs.org/~bfields/linux:
nfsd4: BUG_ON(!is_spin_locked()) no good on UP kernels
NFS: hard-code init_net for NFS callback transports

+7 -8
+5 -6
fs/nfs/callback.c
··· 17 17 #include <linux/kthread.h> 18 18 #include <linux/sunrpc/svcauth_gss.h> 19 19 #include <linux/sunrpc/bc_xprt.h> 20 - #include <linux/nsproxy.h> 21 20 22 21 #include <net/inet_sock.h> 23 22 ··· 106 107 { 107 108 int ret; 108 109 109 - ret = svc_create_xprt(serv, "tcp", xprt->xprt_net, PF_INET, 110 + ret = svc_create_xprt(serv, "tcp", &init_net, PF_INET, 110 111 nfs_callback_set_tcpport, SVC_SOCK_ANONYMOUS); 111 112 if (ret <= 0) 112 113 goto out_err; ··· 114 115 dprintk("NFS: Callback listener port = %u (af %u)\n", 115 116 nfs_callback_tcpport, PF_INET); 116 117 117 - ret = svc_create_xprt(serv, "tcp", xprt->xprt_net, PF_INET6, 118 + ret = svc_create_xprt(serv, "tcp", &init_net, PF_INET6, 118 119 nfs_callback_set_tcpport, SVC_SOCK_ANONYMOUS); 119 120 if (ret > 0) { 120 121 nfs_callback_tcpport6 = ret; ··· 183 184 * fore channel connection. 184 185 * Returns the input port (0) and sets the svc_serv bc_xprt on success 185 186 */ 186 - ret = svc_create_xprt(serv, "tcp-bc", xprt->xprt_net, PF_INET, 0, 187 + ret = svc_create_xprt(serv, "tcp-bc", &init_net, PF_INET, 0, 187 188 SVC_SOCK_ANONYMOUS); 188 189 if (ret < 0) { 189 190 rqstp = ERR_PTR(ret); ··· 253 254 char svc_name[12]; 254 255 int ret = 0; 255 256 int minorversion_setup; 256 - struct net *net = current->nsproxy->net_ns; 257 + struct net *net = &init_net; 257 258 258 259 mutex_lock(&nfs_callback_mutex); 259 260 if (cb_info->users++ || cb_info->task != NULL) { ··· 329 330 cb_info->users--; 330 331 if (cb_info->users == 0 && cb_info->task != NULL) { 331 332 kthread_stop(cb_info->task); 332 - svc_shutdown_net(cb_info->serv, current->nsproxy->net_ns); 333 + svc_shutdown_net(cb_info->serv, &init_net); 333 334 svc_exit_thread(cb_info->rqst); 334 335 cb_info->serv = NULL; 335 336 cb_info->rqst = NULL;
+2 -2
fs/nfsd/nfs4state.c
··· 900 900 struct nfsd4_session *ses; 901 901 int mem; 902 902 903 - BUG_ON(!spin_is_locked(&client_lock)); 903 + lockdep_assert_held(&client_lock); 904 904 ses = container_of(kref, struct nfsd4_session, se_ref); 905 905 nfsd4_del_conns(ses); 906 906 spin_lock(&nfsd_drc_lock); ··· 1080 1080 static inline void 1081 1081 free_client(struct nfs4_client *clp) 1082 1082 { 1083 - BUG_ON(!spin_is_locked(&client_lock)); 1083 + lockdep_assert_held(&client_lock); 1084 1084 while (!list_empty(&clp->cl_sessions)) { 1085 1085 struct nfsd4_session *ses; 1086 1086 ses = list_entry(clp->cl_sessions.next, struct nfsd4_session,