diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-07-15 18:34:58 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-07-15 18:34:58 -0400 |
commit | cadc723cc19ce6b881d973d3c04e25ebb83058e6 (patch) | |
tree | 9256b4bc0685bca22469eab87cd3ec3c2deba60d /fs/lockd/svclock.c | |
parent | e89e896d31b11a51a54ddcd3f72a76bd286dd86c (diff) | |
parent | f839c4c1991cc9b580ae38f98f54554938a7f49c (diff) |
Merge branch 'bkl-removal' into next
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 = { |