Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 153615
b: refs/heads/master
c: 963891a
h: refs/heads/master
i:
  153613: 78d1d8f
  153611: 799eb5b
  153607: 3723a44
  153599: 031ff73
v: v3
  • Loading branch information
Ricardo Labiaga authored and Benny Halevy committed Jun 17, 2009
1 parent 96d90b2 commit cc0eb47
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f8625a6a4bb76207302be58453603d8e324df490
refs/heads/master: 963891ac43ecf9974d82f4c178752e11e007cf87
36 changes: 36 additions & 0 deletions trunk/fs/nfs/callback_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,42 @@ __be32 nfs4_callback_recall(struct cb_recallargs *args, void *dummy)

#if defined(CONFIG_NFS_V4_1)

/*
* Returns a pointer to a held 'struct nfs_client' that matches the server's
* address, major version number, and session ID. It is the caller's
* responsibility to release the returned reference.
*
* Returns NULL if there are no connections with sessions, or if no session
* matches the one of interest.
*/
static struct nfs_client *find_client_with_session(
const struct sockaddr *addr, u32 nfsversion,
struct nfs4_sessionid *sessionid)
{
struct nfs_client *clp;

clp = nfs_find_client(addr, 4);
if (clp == NULL)
return NULL;

do {
struct nfs_client *prev = clp;

if (clp->cl_session != NULL) {
if (memcmp(clp->cl_session->sess_id.data,
sessionid->data,
NFS4_MAX_SESSIONID_LEN) == 0) {
/* Returns a held reference to clp */
return clp;
}
}
clp = nfs_find_client_next(prev);
nfs_put_client(prev);
} while (clp != NULL);

return NULL;
}

/* FIXME: validate args->cbs_{sequence,slot}id */
/* FIXME: referring calls should be processed */
unsigned nfs4_callback_sequence(struct cb_sequenceargs *args,
Expand Down

0 comments on commit cc0eb47

Please sign in to comment.