nfs4client.c (42c2c4249cd0192e29eec71e3e94d7bbc383c8de) | nfs4client.c (459de2edb9105a5d091f8215650e12c0812d59f3) |
---|---|
1/* 2 * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved. 3 * Written by David Howells (dhowells@redhat.com) 4 */ 5#include <linux/module.h> 6#include <linux/nfs_fs.h> 7#include <linux/nfs_idmap.h> 8#include <linux/nfs_mount.h> --- 553 unchanged lines hidden (view full) --- 562 * NFSv4.1 callback thread helper 563 * For CB_COMPOUND calls, find a client by IP address, protocol version, 564 * minorversion, and sessionID 565 * 566 * Returns NULL if no such client 567 */ 568struct nfs_client * 569nfs4_find_client_sessionid(struct net *net, const struct sockaddr *addr, | 1/* 2 * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved. 3 * Written by David Howells (dhowells@redhat.com) 4 */ 5#include <linux/module.h> 6#include <linux/nfs_fs.h> 7#include <linux/nfs_idmap.h> 8#include <linux/nfs_mount.h> --- 553 unchanged lines hidden (view full) --- 562 * NFSv4.1 callback thread helper 563 * For CB_COMPOUND calls, find a client by IP address, protocol version, 564 * minorversion, and sessionID 565 * 566 * Returns NULL if no such client 567 */ 568struct nfs_client * 569nfs4_find_client_sessionid(struct net *net, const struct sockaddr *addr, |
570 struct nfs4_sessionid *sid) | 570 struct nfs4_sessionid *sid, u32 minorversion) |
571{ 572 struct nfs_client *clp; 573 struct nfs_net *nn = net_generic(net, nfs_net_id); 574 575 spin_lock(&nn->nfs_client_lock); 576 list_for_each_entry(clp, &nn->nfs_client_list, cl_share_link) { | 571{ 572 struct nfs_client *clp; 573 struct nfs_net *nn = net_generic(net, nfs_net_id); 574 575 spin_lock(&nn->nfs_client_lock); 576 list_for_each_entry(clp, &nn->nfs_client_list, cl_share_link) { |
577 if (nfs4_cb_match_client(addr, clp, 1) == false) | 577 if (nfs4_cb_match_client(addr, clp, minorversion) == false) |
578 continue; 579 580 if (!nfs4_has_session(clp)) 581 continue; 582 583 /* Match sessionid*/ 584 if (memcmp(clp->cl_session->sess_id.data, 585 sid->data, NFS4_MAX_SESSIONID_LEN) != 0) --- 6 unchanged lines hidden (view full) --- 592 spin_unlock(&nn->nfs_client_lock); 593 return NULL; 594} 595 596#else /* CONFIG_NFS_V4_1 */ 597 598struct nfs_client * 599nfs4_find_client_sessionid(struct net *net, const struct sockaddr *addr, | 578 continue; 579 580 if (!nfs4_has_session(clp)) 581 continue; 582 583 /* Match sessionid*/ 584 if (memcmp(clp->cl_session->sess_id.data, 585 sid->data, NFS4_MAX_SESSIONID_LEN) != 0) --- 6 unchanged lines hidden (view full) --- 592 spin_unlock(&nn->nfs_client_lock); 593 return NULL; 594} 595 596#else /* CONFIG_NFS_V4_1 */ 597 598struct nfs_client * 599nfs4_find_client_sessionid(struct net *net, const struct sockaddr *addr, |
600 struct nfs4_sessionid *sid) | 600 struct nfs4_sessionid *sid, u32 minorversion) |
601{ 602 return NULL; 603} 604#endif /* CONFIG_NFS_V4_1 */ 605 606/* 607 * Set up an NFS4 client 608 */ --- 313 unchanged lines hidden --- | 601{ 602 return NULL; 603} 604#endif /* CONFIG_NFS_V4_1 */ 605 606/* 607 * Set up an NFS4 client 608 */ --- 313 unchanged lines hidden --- |