diff options
Diffstat (limited to 'fs/lockd/clntproc.c')
-rw-r--r-- | fs/lockd/clntproc.c | 42 |
1 files changed, 1 insertions, 41 deletions
diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c index a34b709006a1..5f13e0363b28 100644 --- a/fs/lockd/clntproc.c +++ b/fs/lockd/clntproc.c | |||
@@ -155,8 +155,6 @@ static void nlmclnt_release_lockargs(struct nlm_rqst *req) | |||
155 | int nlmclnt_proc(struct nlm_host *host, int cmd, struct file_lock *fl) | 155 | int nlmclnt_proc(struct nlm_host *host, int cmd, struct file_lock *fl) |
156 | { | 156 | { |
157 | struct nlm_rqst *call; | 157 | struct nlm_rqst *call; |
158 | sigset_t oldset; | ||
159 | unsigned long flags; | ||
160 | int status; | 158 | int status; |
161 | 159 | ||
162 | nlm_get_host(host); | 160 | nlm_get_host(host); |
@@ -168,22 +166,6 @@ int nlmclnt_proc(struct nlm_host *host, int cmd, struct file_lock *fl) | |||
168 | /* Set up the argument struct */ | 166 | /* Set up the argument struct */ |
169 | nlmclnt_setlockargs(call, fl); | 167 | nlmclnt_setlockargs(call, fl); |
170 | 168 | ||
171 | /* Keep the old signal mask */ | ||
172 | spin_lock_irqsave(¤t->sighand->siglock, flags); | ||
173 | oldset = current->blocked; | ||
174 | |||
175 | /* If we're cleaning up locks because the process is exiting, | ||
176 | * perform the RPC call asynchronously. */ | ||
177 | if ((IS_SETLK(cmd) || IS_SETLKW(cmd)) | ||
178 | && fl->fl_type == F_UNLCK | ||
179 | && (current->flags & PF_EXITING)) { | ||
180 | sigfillset(¤t->blocked); /* Mask all signals */ | ||
181 | recalc_sigpending(); | ||
182 | |||
183 | call->a_flags = RPC_TASK_ASYNC; | ||
184 | } | ||
185 | spin_unlock_irqrestore(¤t->sighand->siglock, flags); | ||
186 | |||
187 | if (IS_SETLK(cmd) || IS_SETLKW(cmd)) { | 169 | if (IS_SETLK(cmd) || IS_SETLKW(cmd)) { |
188 | if (fl->fl_type != F_UNLCK) { | 170 | if (fl->fl_type != F_UNLCK) { |
189 | call->a_args.block = IS_SETLKW(cmd) ? 1 : 0; | 171 | call->a_args.block = IS_SETLKW(cmd) ? 1 : 0; |
@@ -198,11 +180,6 @@ int nlmclnt_proc(struct nlm_host *host, int cmd, struct file_lock *fl) | |||
198 | fl->fl_ops->fl_release_private(fl); | 180 | fl->fl_ops->fl_release_private(fl); |
199 | fl->fl_ops = NULL; | 181 | fl->fl_ops = NULL; |
200 | 182 | ||
201 | spin_lock_irqsave(¤t->sighand->siglock, flags); | ||
202 | current->blocked = oldset; | ||
203 | recalc_sigpending(); | ||
204 | spin_unlock_irqrestore(¤t->sighand->siglock, flags); | ||
205 | |||
206 | dprintk("lockd: clnt proc returns %d\n", status); | 183 | dprintk("lockd: clnt proc returns %d\n", status); |
207 | return status; | 184 | return status; |
208 | } | 185 | } |
@@ -722,16 +699,6 @@ static const struct rpc_call_ops nlmclnt_unlock_ops = { | |||
722 | static int nlmclnt_cancel(struct nlm_host *host, int block, struct file_lock *fl) | 699 | static int nlmclnt_cancel(struct nlm_host *host, int block, struct file_lock *fl) |
723 | { | 700 | { |
724 | struct nlm_rqst *req; | 701 | struct nlm_rqst *req; |
725 | unsigned long flags; | ||
726 | sigset_t oldset; | ||
727 | int status; | ||
728 | |||
729 | /* Block all signals while setting up call */ | ||
730 | spin_lock_irqsave(¤t->sighand->siglock, flags); | ||
731 | oldset = current->blocked; | ||
732 | sigfillset(¤t->blocked); | ||
733 | recalc_sigpending(); | ||
734 | spin_unlock_irqrestore(¤t->sighand->siglock, flags); | ||
735 | 702 | ||
736 | req = nlm_alloc_call(nlm_get_host(host)); | 703 | req = nlm_alloc_call(nlm_get_host(host)); |
737 | if (!req) | 704 | if (!req) |
@@ -741,14 +708,7 @@ static int nlmclnt_cancel(struct nlm_host *host, int block, struct file_lock *fl | |||
741 | nlmclnt_setlockargs(req, fl); | 708 | nlmclnt_setlockargs(req, fl); |
742 | req->a_args.block = block; | 709 | req->a_args.block = block; |
743 | 710 | ||
744 | status = nlmclnt_async_call(req, NLMPROC_CANCEL, &nlmclnt_cancel_ops); | 711 | return nlmclnt_async_call(req, NLMPROC_CANCEL, &nlmclnt_cancel_ops); |
745 | |||
746 | spin_lock_irqsave(¤t->sighand->siglock, flags); | ||
747 | current->blocked = oldset; | ||
748 | recalc_sigpending(); | ||
749 | spin_unlock_irqrestore(¤t->sighand->siglock, flags); | ||
750 | |||
751 | return status; | ||
752 | } | 712 | } |
753 | 713 | ||
754 | static void nlmclnt_cancel_callback(struct rpc_task *task, void *data) | 714 | static void nlmclnt_cancel_callback(struct rpc_task *task, void *data) |