diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-07-18 06:20:23 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-07-18 06:20:23 -0400 |
| commit | cd569ef5d6ff9f43e9504f1ffc7fdbe356518149 (patch) | |
| tree | 9a4ab5e600fd09e991aa1fbb69adb1c7950898a4 /fs/lockd/svclock.c | |
| parent | 6879827f4e08da219c99b91e4e1d793a924103e3 (diff) | |
| parent | 5b664cb235e97afbf34db9c4d77f08ebd725335e (diff) | |
Merge branch 'linus' into x86/urgent
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 = { |
