diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-06-11 13:37:09 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-07-15 18:10:57 -0400 |
commit | a86dc496b764ebb1431677b38eab45310e5a2ad4 (patch) | |
tree | 2ca9fa18c4f58de08acc7c8f9ea251a279eeba9b /fs/lockd/svclock.c | |
parent | c3cc8c019ca09767d7c9b5457d5cf8ac65085f44 (diff) |
SUNRPC: Remove the BKL from the callback functions
Push it into those callback functions that actually need it.
Note that all the NFS operations use their own locking, so don't need the
BKL. Ditto for the rpcbind client.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/lockd/svclock.c')
-rw-r--r-- | fs/lockd/svclock.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c index 81aca859bfde..56a08ab9a4cb 100644 --- a/fs/lockd/svclock.c +++ b/fs/lockd/svclock.c | |||
@@ -795,6 +795,7 @@ static void nlmsvc_grant_callback(struct rpc_task *task, void *data) | |||
795 | 795 | ||
796 | dprintk("lockd: GRANT_MSG RPC callback\n"); | 796 | dprintk("lockd: GRANT_MSG RPC callback\n"); |
797 | 797 | ||
798 | lock_kernel(); | ||
798 | /* if the block is not on a list at this point then it has | 799 | /* if the block is not on a list at this point then it has |
799 | * been invalidated. Don't try to requeue it. | 800 | * been invalidated. Don't try to requeue it. |
800 | * | 801 | * |
@@ -804,7 +805,7 @@ static void nlmsvc_grant_callback(struct rpc_task *task, void *data) | |||
804 | * for nlm_blocked? | 805 | * for nlm_blocked? |
805 | */ | 806 | */ |
806 | if (list_empty(&block->b_list)) | 807 | if (list_empty(&block->b_list)) |
807 | return; | 808 | goto out; |
808 | 809 | ||
809 | /* Technically, we should down the file semaphore here. Since we | 810 | /* Technically, we should down the file semaphore here. Since we |
810 | * move the block towards the head of the queue only, no harm | 811 | * move the block towards the head of the queue only, no harm |
@@ -818,13 +819,17 @@ static void nlmsvc_grant_callback(struct rpc_task *task, void *data) | |||
818 | } | 819 | } |
819 | nlmsvc_insert_block(block, timeout); | 820 | nlmsvc_insert_block(block, timeout); |
820 | svc_wake_up(block->b_daemon); | 821 | svc_wake_up(block->b_daemon); |
822 | out: | ||
823 | unlock_kernel(); | ||
821 | } | 824 | } |
822 | 825 | ||
823 | static void nlmsvc_grant_release(void *data) | 826 | static void nlmsvc_grant_release(void *data) |
824 | { | 827 | { |
825 | struct nlm_rqst *call = data; | 828 | struct nlm_rqst *call = data; |
826 | 829 | ||
830 | lock_kernel(); | ||
827 | nlmsvc_release_block(call->a_block); | 831 | nlmsvc_release_block(call->a_block); |
832 | unlock_kernel(); | ||
828 | } | 833 | } |
829 | 834 | ||
830 | static const struct rpc_call_ops nlmsvc_grant_ops = { | 835 | static const struct rpc_call_ops nlmsvc_grant_ops = { |