]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd41: free_session/free_client must be called under the client_lock
authorBenny Halevy <bhalevy@tonian.com>
Fri, 24 Feb 2012 01:40:52 +0000 (17:40 -0800)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 6 Mar 2012 23:13:35 +0000 (18:13 -0500)
commit3c2539b4673e26a61e4b937ab1830b96e2965db8
treef55bd04f6a51fecb020a6b677935e232a3d9d709
parent44f2bfb03e3014bdebb320497fb2af9f473e2ec8
nfsd41: free_session/free_client must be called under the client_lock

The session client is manipulated under the client_lock hence
both free_session and nfsd4_del_conns must be called under this lock.

This patch adds a BUG_ON that checks this condition in the
respective functions and implements the missing locks.

nfsd4_{get,put}_session helpers were moved to the C file that uses them
so to prevent use from external files and an unlocked version of
nfsd4_put_session is provided for external use from nfs4xdr.c

Signed-off-by: Benny Halevy <bhalevy@tonian.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4state.c
fs/nfsd/state.h