diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-31 19:45:47 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-31 19:45:47 -0500 |
commit | 75659ca0c10992dcb39258518368a0f6f56e935d (patch) | |
tree | 5d014ceb2f10158061a23d0d976f9a613d85e659 /fs | |
parent | fbdde7bd274d74729954190f99afcb1e3d9bbfba (diff) | |
parent | 2dfe485a2c8afa54cb069fcf48476f6c90ea3fdf (diff) |
Merge branch 'task_killable' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc
* 'task_killable' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc: (22 commits)
Remove commented-out code copied from NFS
NFS: Switch from intr mount option to TASK_KILLABLE
Add wait_for_completion_killable
Add wait_event_killable
Add schedule_timeout_killable
Use mutex_lock_killable in vfs_readdir
Add mutex_lock_killable
Use lock_page_killable
Add lock_page_killable
Add fatal_signal_pending
Add TASK_WAKEKILL
exit: Use task_is_*
signal: Use task_is_*
sched: Use task_contributes_to_load, TASK_ALL and TASK_NORMAL
ptrace: Use task_is_*
power: Use task_is_*
wait: Use TASK_NORMAL
proc/base.c: Use task_is_*
proc/array.c: Use TASK_REPORT
perfmon: Use task_is_*
...
Fixed up conflicts in NFS/sunrpc manually..
Diffstat (limited to 'fs')
-rw-r--r-- | fs/eventpoll.c | 11 | ||||
-rw-r--r-- | fs/nfs/client.c | 6 | ||||
-rw-r--r-- | fs/nfs/direct.c | 7 | ||||
-rw-r--r-- | fs/nfs/inode.c | 6 | ||||
-rw-r--r-- | fs/nfs/mount_clnt.c | 2 | ||||
-rw-r--r-- | fs/nfs/nfs3proc.c | 7 | ||||
-rw-r--r-- | fs/nfs/nfs4proc.c | 27 | ||||
-rw-r--r-- | fs/nfs/nfsroot.c | 3 | ||||
-rw-r--r-- | fs/nfs/pagelist.c | 19 | ||||
-rw-r--r-- | fs/nfs/super.c | 4 | ||||
-rw-r--r-- | fs/nfs/write.c | 2 | ||||
-rw-r--r-- | fs/proc/array.c | 7 | ||||
-rw-r--r-- | fs/proc/base.c | 2 | ||||
-rw-r--r-- | fs/readdir.c | 5 | ||||
-rw-r--r-- | fs/smbfs/request.c | 2 |
15 files changed, 30 insertions, 80 deletions
diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 34f68f3a069a..81c04abfb1aa 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c | |||
@@ -656,8 +656,7 @@ is_linked: | |||
656 | * wait list. | 656 | * wait list. |
657 | */ | 657 | */ |
658 | if (waitqueue_active(&ep->wq)) | 658 | if (waitqueue_active(&ep->wq)) |
659 | __wake_up_locked(&ep->wq, TASK_UNINTERRUPTIBLE | | 659 | wake_up_locked(&ep->wq); |
660 | TASK_INTERRUPTIBLE); | ||
661 | if (waitqueue_active(&ep->poll_wait)) | 660 | if (waitqueue_active(&ep->poll_wait)) |
662 | pwake++; | 661 | pwake++; |
663 | 662 | ||
@@ -780,7 +779,7 @@ static int ep_insert(struct eventpoll *ep, struct epoll_event *event, | |||
780 | 779 | ||
781 | /* Notify waiting tasks that events are available */ | 780 | /* Notify waiting tasks that events are available */ |
782 | if (waitqueue_active(&ep->wq)) | 781 | if (waitqueue_active(&ep->wq)) |
783 | __wake_up_locked(&ep->wq, TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE); | 782 | wake_up_locked(&ep->wq); |
784 | if (waitqueue_active(&ep->poll_wait)) | 783 | if (waitqueue_active(&ep->poll_wait)) |
785 | pwake++; | 784 | pwake++; |
786 | } | 785 | } |
@@ -854,8 +853,7 @@ static int ep_modify(struct eventpoll *ep, struct epitem *epi, struct epoll_even | |||
854 | 853 | ||
855 | /* Notify waiting tasks that events are available */ | 854 | /* Notify waiting tasks that events are available */ |
856 | if (waitqueue_active(&ep->wq)) | 855 | if (waitqueue_active(&ep->wq)) |
857 | __wake_up_locked(&ep->wq, TASK_UNINTERRUPTIBLE | | 856 | wake_up_locked(&ep->wq); |
858 | TASK_INTERRUPTIBLE); | ||
859 | if (waitqueue_active(&ep->poll_wait)) | 857 | if (waitqueue_active(&ep->poll_wait)) |
860 | pwake++; | 858 | pwake++; |
861 | } | 859 | } |
@@ -978,8 +976,7 @@ errxit: | |||
978 | * wait list (delayed after we release the lock). | 976 | * wait list (delayed after we release the lock). |
979 | */ | 977 | */ |
980 | if (waitqueue_active(&ep->wq)) | 978 | if (waitqueue_active(&ep->wq)) |
981 | __wake_up_locked(&ep->wq, TASK_UNINTERRUPTIBLE | | 979 | wake_up_locked(&ep->wq); |
982 | TASK_INTERRUPTIBLE); | ||
983 | if (waitqueue_active(&ep->poll_wait)) | 980 | if (waitqueue_active(&ep->poll_wait)) |
984 | pwake++; | 981 | pwake++; |
985 | } | 982 | } |
diff --git a/fs/nfs/client.c b/fs/nfs/client.c index 685c43f810c1..c5c0175898f6 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c | |||
@@ -386,7 +386,7 @@ found_client: | |||
386 | if (new) | 386 | if (new) |
387 | nfs_free_client(new); | 387 | nfs_free_client(new); |
388 | 388 | ||
389 | error = wait_event_interruptible(nfs_client_active_wq, | 389 | error = wait_event_killable(nfs_client_active_wq, |
390 | clp->cl_cons_state != NFS_CS_INITING); | 390 | clp->cl_cons_state != NFS_CS_INITING); |
391 | if (error < 0) { | 391 | if (error < 0) { |
392 | nfs_put_client(clp); | 392 | nfs_put_client(clp); |
@@ -589,10 +589,6 @@ static int nfs_init_server_rpcclient(struct nfs_server *server, | |||
589 | if (server->flags & NFS_MOUNT_SOFT) | 589 | if (server->flags & NFS_MOUNT_SOFT) |
590 | server->client->cl_softrtry = 1; | 590 | server->client->cl_softrtry = 1; |
591 | 591 | ||
592 | server->client->cl_intr = 0; | ||
593 | if (server->flags & NFS4_MOUNT_INTR) | ||
594 | server->client->cl_intr = 1; | ||
595 | |||
596 | return 0; | 592 | return 0; |
597 | } | 593 | } |
598 | 594 | ||
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index f8e165c7d5a6..16844f98f50e 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c | |||
@@ -188,17 +188,12 @@ static void nfs_direct_req_release(struct nfs_direct_req *dreq) | |||
188 | static ssize_t nfs_direct_wait(struct nfs_direct_req *dreq) | 188 | static ssize_t nfs_direct_wait(struct nfs_direct_req *dreq) |
189 | { | 189 | { |
190 | ssize_t result = -EIOCBQUEUED; | 190 | ssize_t result = -EIOCBQUEUED; |
191 | struct rpc_clnt *clnt; | ||
192 | sigset_t oldset; | ||
193 | 191 | ||
194 | /* Async requests don't wait here */ | 192 | /* Async requests don't wait here */ |
195 | if (dreq->iocb) | 193 | if (dreq->iocb) |
196 | goto out; | 194 | goto out; |
197 | 195 | ||
198 | clnt = NFS_CLIENT(dreq->inode); | 196 | result = wait_for_completion_killable(&dreq->completion); |
199 | rpc_clnt_sigmask(clnt, &oldset); | ||
200 | result = wait_for_completion_interruptible(&dreq->completion); | ||
201 | rpc_clnt_sigunmask(clnt, &oldset); | ||
202 | 197 | ||
203 | if (!result) | 198 | if (!result) |
204 | result = dreq->error; | 199 | result = dreq->error; |
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 3f332e54e760..966a8850aa30 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -433,15 +433,11 @@ static int nfs_wait_schedule(void *word) | |||
433 | */ | 433 | */ |
434 | static int nfs_wait_on_inode(struct inode *inode) | 434 | static int nfs_wait_on_inode(struct inode *inode) |
435 | { | 435 | { |
436 | struct rpc_clnt *clnt = NFS_CLIENT(inode); | ||
437 | struct nfs_inode *nfsi = NFS_I(inode); | 436 | struct nfs_inode *nfsi = NFS_I(inode); |
438 | sigset_t oldmask; | ||
439 | int error; | 437 | int error; |
440 | 438 | ||
441 | rpc_clnt_sigmask(clnt, &oldmask); | ||
442 | error = wait_on_bit_lock(&nfsi->flags, NFS_INO_REVALIDATING, | 439 | error = wait_on_bit_lock(&nfsi->flags, NFS_INO_REVALIDATING, |
443 | nfs_wait_schedule, TASK_INTERRUPTIBLE); | 440 | nfs_wait_schedule, TASK_KILLABLE); |
444 | rpc_clnt_sigunmask(clnt, &oldmask); | ||
445 | 441 | ||
446 | return error; | 442 | return error; |
447 | } | 443 | } |
diff --git a/fs/nfs/mount_clnt.c b/fs/nfs/mount_clnt.c index 8afd9f7e7a97..49c7cd0502cc 100644 --- a/fs/nfs/mount_clnt.c +++ b/fs/nfs/mount_clnt.c | |||
@@ -56,7 +56,7 @@ int nfs_mount(struct sockaddr *addr, size_t len, char *hostname, char *path, | |||
56 | .program = &mnt_program, | 56 | .program = &mnt_program, |
57 | .version = version, | 57 | .version = version, |
58 | .authflavor = RPC_AUTH_UNIX, | 58 | .authflavor = RPC_AUTH_UNIX, |
59 | .flags = RPC_CLNT_CREATE_INTR, | 59 | .flags = 0, |
60 | }; | 60 | }; |
61 | struct rpc_clnt *mnt_clnt; | 61 | struct rpc_clnt *mnt_clnt; |
62 | int status; | 62 | int status; |
diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c index b353c1a05bfd..549dbce714a4 100644 --- a/fs/nfs/nfs3proc.c +++ b/fs/nfs/nfs3proc.c | |||
@@ -27,17 +27,14 @@ | |||
27 | static int | 27 | static int |
28 | nfs3_rpc_wrapper(struct rpc_clnt *clnt, struct rpc_message *msg, int flags) | 28 | nfs3_rpc_wrapper(struct rpc_clnt *clnt, struct rpc_message *msg, int flags) |
29 | { | 29 | { |
30 | sigset_t oldset; | ||
31 | int res; | 30 | int res; |
32 | rpc_clnt_sigmask(clnt, &oldset); | ||
33 | do { | 31 | do { |
34 | res = rpc_call_sync(clnt, msg, flags); | 32 | res = rpc_call_sync(clnt, msg, flags); |
35 | if (res != -EJUKEBOX) | 33 | if (res != -EJUKEBOX) |
36 | break; | 34 | break; |
37 | schedule_timeout_interruptible(NFS_JUKEBOX_RETRY_TIME); | 35 | schedule_timeout_killable(NFS_JUKEBOX_RETRY_TIME); |
38 | res = -ERESTARTSYS; | 36 | res = -ERESTARTSYS; |
39 | } while (!signalled()); | 37 | } while (!fatal_signal_pending(current)); |
40 | rpc_clnt_sigunmask(clnt, &oldset); | ||
41 | return res; | 38 | return res; |
42 | } | 39 | } |
43 | 40 | ||
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 5c189bd57eb2..027e1095256e 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -316,12 +316,9 @@ static void nfs4_opendata_put(struct nfs4_opendata *p) | |||
316 | 316 | ||
317 | static int nfs4_wait_for_completion_rpc_task(struct rpc_task *task) | 317 | static int nfs4_wait_for_completion_rpc_task(struct rpc_task *task) |
318 | { | 318 | { |
319 | sigset_t oldset; | ||
320 | int ret; | 319 | int ret; |
321 | 320 | ||
322 | rpc_clnt_sigmask(task->tk_client, &oldset); | ||
323 | ret = rpc_wait_for_completion_task(task); | 321 | ret = rpc_wait_for_completion_task(task); |
324 | rpc_clnt_sigunmask(task->tk_client, &oldset); | ||
325 | return ret; | 322 | return ret; |
326 | } | 323 | } |
327 | 324 | ||
@@ -2785,9 +2782,9 @@ nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server) | |||
2785 | return 0; | 2782 | return 0; |
2786 | } | 2783 | } |
2787 | 2784 | ||
2788 | static int nfs4_wait_bit_interruptible(void *word) | 2785 | static int nfs4_wait_bit_killable(void *word) |
2789 | { | 2786 | { |
2790 | if (signal_pending(current)) | 2787 | if (fatal_signal_pending(current)) |
2791 | return -ERESTARTSYS; | 2788 | return -ERESTARTSYS; |
2792 | schedule(); | 2789 | schedule(); |
2793 | return 0; | 2790 | return 0; |
@@ -2795,18 +2792,14 @@ static int nfs4_wait_bit_interruptible(void *word) | |||
2795 | 2792 | ||
2796 | static int nfs4_wait_clnt_recover(struct rpc_clnt *clnt, struct nfs_client *clp) | 2793 | static int nfs4_wait_clnt_recover(struct rpc_clnt *clnt, struct nfs_client *clp) |
2797 | { | 2794 | { |
2798 | sigset_t oldset; | ||
2799 | int res; | 2795 | int res; |
2800 | 2796 | ||
2801 | might_sleep(); | 2797 | might_sleep(); |
2802 | 2798 | ||
2803 | rwsem_acquire(&clp->cl_sem.dep_map, 0, 0, _RET_IP_); | 2799 | rwsem_acquire(&clp->cl_sem.dep_map, 0, 0, _RET_IP_); |
2804 | 2800 | ||
2805 | rpc_clnt_sigmask(clnt, &oldset); | ||
2806 | res = wait_on_bit(&clp->cl_state, NFS4CLNT_STATE_RECOVER, | 2801 | res = wait_on_bit(&clp->cl_state, NFS4CLNT_STATE_RECOVER, |
2807 | nfs4_wait_bit_interruptible, | 2802 | nfs4_wait_bit_killable, TASK_KILLABLE); |
2808 | TASK_INTERRUPTIBLE); | ||
2809 | rpc_clnt_sigunmask(clnt, &oldset); | ||
2810 | 2803 | ||
2811 | rwsem_release(&clp->cl_sem.dep_map, 1, _RET_IP_); | 2804 | rwsem_release(&clp->cl_sem.dep_map, 1, _RET_IP_); |
2812 | return res; | 2805 | return res; |
@@ -2814,7 +2807,6 @@ static int nfs4_wait_clnt_recover(struct rpc_clnt *clnt, struct nfs_client *clp) | |||
2814 | 2807 | ||
2815 | static int nfs4_delay(struct rpc_clnt *clnt, long *timeout) | 2808 | static int nfs4_delay(struct rpc_clnt *clnt, long *timeout) |
2816 | { | 2809 | { |
2817 | sigset_t oldset; | ||
2818 | int res = 0; | 2810 | int res = 0; |
2819 | 2811 | ||
2820 | might_sleep(); | 2812 | might_sleep(); |
@@ -2823,14 +2815,9 @@ static int nfs4_delay(struct rpc_clnt *clnt, long *timeout) | |||
2823 | *timeout = NFS4_POLL_RETRY_MIN; | 2815 | *timeout = NFS4_POLL_RETRY_MIN; |
2824 | if (*timeout > NFS4_POLL_RETRY_MAX) | 2816 | if (*timeout > NFS4_POLL_RETRY_MAX) |
2825 | *timeout = NFS4_POLL_RETRY_MAX; | 2817 | *timeout = NFS4_POLL_RETRY_MAX; |
2826 | rpc_clnt_sigmask(clnt, &oldset); | 2818 | schedule_timeout_killable(*timeout); |
2827 | if (clnt->cl_intr) { | 2819 | if (fatal_signal_pending(current)) |
2828 | schedule_timeout_interruptible(*timeout); | 2820 | res = -ERESTARTSYS; |
2829 | if (signalled()) | ||
2830 | res = -ERESTARTSYS; | ||
2831 | } else | ||
2832 | schedule_timeout_uninterruptible(*timeout); | ||
2833 | rpc_clnt_sigunmask(clnt, &oldset); | ||
2834 | *timeout <<= 1; | 2821 | *timeout <<= 1; |
2835 | return res; | 2822 | return res; |
2836 | } | 2823 | } |
@@ -3069,7 +3056,7 @@ int nfs4_proc_delegreturn(struct inode *inode, struct rpc_cred *cred, const nfs4 | |||
3069 | static unsigned long | 3056 | static unsigned long |
3070 | nfs4_set_lock_task_retry(unsigned long timeout) | 3057 | nfs4_set_lock_task_retry(unsigned long timeout) |
3071 | { | 3058 | { |
3072 | schedule_timeout_interruptible(timeout); | 3059 | schedule_timeout_killable(timeout); |
3073 | timeout <<= 1; | 3060 | timeout <<= 1; |
3074 | if (timeout > NFS4_LOCK_MAXTIMEOUT) | 3061 | if (timeout > NFS4_LOCK_MAXTIMEOUT) |
3075 | return NFS4_LOCK_MAXTIMEOUT; | 3062 | return NFS4_LOCK_MAXTIMEOUT; |
diff --git a/fs/nfs/nfsroot.c b/fs/nfs/nfsroot.c index 4b0334590ee5..531379d36823 100644 --- a/fs/nfs/nfsroot.c +++ b/fs/nfs/nfsroot.c | |||
@@ -228,10 +228,7 @@ static int __init root_nfs_parse(char *name, char *buf) | |||
228 | nfs_data.flags &= ~NFS_MOUNT_SOFT; | 228 | nfs_data.flags &= ~NFS_MOUNT_SOFT; |
229 | break; | 229 | break; |
230 | case Opt_intr: | 230 | case Opt_intr: |
231 | nfs_data.flags |= NFS_MOUNT_INTR; | ||
232 | break; | ||
233 | case Opt_nointr: | 231 | case Opt_nointr: |
234 | nfs_data.flags &= ~NFS_MOUNT_INTR; | ||
235 | break; | 232 | break; |
236 | case Opt_posix: | 233 | case Opt_posix: |
237 | nfs_data.flags |= NFS_MOUNT_POSIX; | 234 | nfs_data.flags |= NFS_MOUNT_POSIX; |
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c index 3b3dbb94393d..7f079209d70a 100644 --- a/fs/nfs/pagelist.c +++ b/fs/nfs/pagelist.c | |||
@@ -58,7 +58,6 @@ nfs_create_request(struct nfs_open_context *ctx, struct inode *inode, | |||
58 | struct page *page, | 58 | struct page *page, |
59 | unsigned int offset, unsigned int count) | 59 | unsigned int offset, unsigned int count) |
60 | { | 60 | { |
61 | struct nfs_server *server = NFS_SERVER(inode); | ||
62 | struct nfs_page *req; | 61 | struct nfs_page *req; |
63 | 62 | ||
64 | for (;;) { | 63 | for (;;) { |
@@ -67,7 +66,7 @@ nfs_create_request(struct nfs_open_context *ctx, struct inode *inode, | |||
67 | if (req != NULL) | 66 | if (req != NULL) |
68 | break; | 67 | break; |
69 | 68 | ||
70 | if (signalled() && (server->flags & NFS_MOUNT_INTR)) | 69 | if (fatal_signal_pending(current)) |
71 | return ERR_PTR(-ERESTARTSYS); | 70 | return ERR_PTR(-ERESTARTSYS); |
72 | yield(); | 71 | yield(); |
73 | } | 72 | } |
@@ -177,11 +176,11 @@ void nfs_release_request(struct nfs_page *req) | |||
177 | kref_put(&req->wb_kref, nfs_free_request); | 176 | kref_put(&req->wb_kref, nfs_free_request); |
178 | } | 177 | } |
179 | 178 | ||
180 | static int nfs_wait_bit_interruptible(void *word) | 179 | static int nfs_wait_bit_killable(void *word) |
181 | { | 180 | { |
182 | int ret = 0; | 181 | int ret = 0; |
183 | 182 | ||
184 | if (signal_pending(current)) | 183 | if (fatal_signal_pending(current)) |
185 | ret = -ERESTARTSYS; | 184 | ret = -ERESTARTSYS; |
186 | else | 185 | else |
187 | schedule(); | 186 | schedule(); |
@@ -192,26 +191,18 @@ static int nfs_wait_bit_interruptible(void *word) | |||
192 | * nfs_wait_on_request - Wait for a request to complete. | 191 | * nfs_wait_on_request - Wait for a request to complete. |
193 | * @req: request to wait upon. | 192 | * @req: request to wait upon. |
194 | * | 193 | * |
195 | * Interruptible by signals only if mounted with intr flag. | 194 | * Interruptible by fatal signals only. |
196 | * The user is responsible for holding a count on the request. | 195 | * The user is responsible for holding a count on the request. |
197 | */ | 196 | */ |
198 | int | 197 | int |
199 | nfs_wait_on_request(struct nfs_page *req) | 198 | nfs_wait_on_request(struct nfs_page *req) |
200 | { | 199 | { |
201 | struct rpc_clnt *clnt = NFS_CLIENT(req->wb_context->path.dentry->d_inode); | ||
202 | sigset_t oldmask; | ||
203 | int ret = 0; | 200 | int ret = 0; |
204 | 201 | ||
205 | if (!test_bit(PG_BUSY, &req->wb_flags)) | 202 | if (!test_bit(PG_BUSY, &req->wb_flags)) |
206 | goto out; | 203 | goto out; |
207 | /* | ||
208 | * Note: the call to rpc_clnt_sigmask() suffices to ensure that we | ||
209 | * are not interrupted if intr flag is not set | ||
210 | */ | ||
211 | rpc_clnt_sigmask(clnt, &oldmask); | ||
212 | ret = out_of_line_wait_on_bit(&req->wb_flags, PG_BUSY, | 204 | ret = out_of_line_wait_on_bit(&req->wb_flags, PG_BUSY, |
213 | nfs_wait_bit_interruptible, TASK_INTERRUPTIBLE); | 205 | nfs_wait_bit_killable, TASK_KILLABLE); |
214 | rpc_clnt_sigunmask(clnt, &oldmask); | ||
215 | out: | 206 | out: |
216 | return ret; | 207 | return ret; |
217 | } | 208 | } |
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 22c49c02897d..7f4505f6ac6f 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -448,7 +448,6 @@ static void nfs_show_mount_options(struct seq_file *m, struct nfs_server *nfss, | |||
448 | const char *nostr; | 448 | const char *nostr; |
449 | } nfs_info[] = { | 449 | } nfs_info[] = { |
450 | { NFS_MOUNT_SOFT, ",soft", ",hard" }, | 450 | { NFS_MOUNT_SOFT, ",soft", ",hard" }, |
451 | { NFS_MOUNT_INTR, ",intr", ",nointr" }, | ||
452 | { NFS_MOUNT_NOCTO, ",nocto", "" }, | 451 | { NFS_MOUNT_NOCTO, ",nocto", "" }, |
453 | { NFS_MOUNT_NOAC, ",noac", "" }, | 452 | { NFS_MOUNT_NOAC, ",noac", "" }, |
454 | { NFS_MOUNT_NONLM, ",nolock", "" }, | 453 | { NFS_MOUNT_NONLM, ",nolock", "" }, |
@@ -708,10 +707,7 @@ static int nfs_parse_mount_options(char *raw, | |||
708 | mnt->flags &= ~NFS_MOUNT_SOFT; | 707 | mnt->flags &= ~NFS_MOUNT_SOFT; |
709 | break; | 708 | break; |
710 | case Opt_intr: | 709 | case Opt_intr: |
711 | mnt->flags |= NFS_MOUNT_INTR; | ||
712 | break; | ||
713 | case Opt_nointr: | 710 | case Opt_nointr: |
714 | mnt->flags &= ~NFS_MOUNT_INTR; | ||
715 | break; | 711 | break; |
716 | case Opt_posix: | 712 | case Opt_posix: |
717 | mnt->flags |= NFS_MOUNT_POSIX; | 713 | mnt->flags |= NFS_MOUNT_POSIX; |
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 5ac5b27b639a..522efff3e2c5 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c | |||
@@ -488,7 +488,7 @@ int nfs_reschedule_unstable_write(struct nfs_page *req) | |||
488 | /* | 488 | /* |
489 | * Wait for a request to complete. | 489 | * Wait for a request to complete. |
490 | * | 490 | * |
491 | * Interruptible by signals only if mounted with intr flag. | 491 | * Interruptible by fatal signals only. |
492 | */ | 492 | */ |
493 | static int nfs_wait_on_requests_locked(struct inode *inode, pgoff_t idx_start, unsigned int npages) | 493 | static int nfs_wait_on_requests_locked(struct inode *inode, pgoff_t idx_start, unsigned int npages) |
494 | { | 494 | { |
diff --git a/fs/proc/array.c b/fs/proc/array.c index eb97f2897e2b..b380313092bd 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c | |||
@@ -141,12 +141,7 @@ static const char *task_state_array[] = { | |||
141 | 141 | ||
142 | static inline const char *get_task_state(struct task_struct *tsk) | 142 | static inline const char *get_task_state(struct task_struct *tsk) |
143 | { | 143 | { |
144 | unsigned int state = (tsk->state & (TASK_RUNNING | | 144 | unsigned int state = (tsk->state & TASK_REPORT) | tsk->exit_state; |
145 | TASK_INTERRUPTIBLE | | ||
146 | TASK_UNINTERRUPTIBLE | | ||
147 | TASK_STOPPED | | ||
148 | TASK_TRACED)) | | ||
149 | tsk->exit_state; | ||
150 | const char **p = &task_state_array[0]; | 145 | const char **p = &task_state_array[0]; |
151 | 146 | ||
152 | while (state) { | 147 | while (state) { |
diff --git a/fs/proc/base.c b/fs/proc/base.c index 91fa8e6ce8ad..9fa9708cc715 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -199,7 +199,7 @@ static int proc_root_link(struct inode *inode, struct dentry **dentry, struct vf | |||
199 | (task == current || \ | 199 | (task == current || \ |
200 | (task->parent == current && \ | 200 | (task->parent == current && \ |
201 | (task->ptrace & PT_PTRACED) && \ | 201 | (task->ptrace & PT_PTRACED) && \ |
202 | (task->state == TASK_STOPPED || task->state == TASK_TRACED) && \ | 202 | (task_is_stopped_or_traced(task)) && \ |
203 | security_ptrace(current,task) == 0)) | 203 | security_ptrace(current,task) == 0)) |
204 | 204 | ||
205 | struct mm_struct *mm_for_maps(struct task_struct *task) | 205 | struct mm_struct *mm_for_maps(struct task_struct *task) |
diff --git a/fs/readdir.c b/fs/readdir.c index efe52e676577..4e026e5407fb 100644 --- a/fs/readdir.c +++ b/fs/readdir.c | |||
@@ -30,7 +30,10 @@ int vfs_readdir(struct file *file, filldir_t filler, void *buf) | |||
30 | if (res) | 30 | if (res) |
31 | goto out; | 31 | goto out; |
32 | 32 | ||
33 | mutex_lock(&inode->i_mutex); | 33 | res = mutex_lock_killable(&inode->i_mutex); |
34 | if (res) | ||
35 | goto out; | ||
36 | |||
34 | res = -ENOENT; | 37 | res = -ENOENT; |
35 | if (!IS_DEADDIR(inode)) { | 38 | if (!IS_DEADDIR(inode)) { |
36 | res = file->f_op->readdir(file, buf, filler); | 39 | res = file->f_op->readdir(file, buf, filler); |
diff --git a/fs/smbfs/request.c b/fs/smbfs/request.c index ca4b2d59c0ca..45f45933e862 100644 --- a/fs/smbfs/request.c +++ b/fs/smbfs/request.c | |||
@@ -105,7 +105,7 @@ struct smb_request *smb_alloc_request(struct smb_sb_info *server, int bufsize) | |||
105 | if (nfs_try_to_free_pages(server)) | 105 | if (nfs_try_to_free_pages(server)) |
106 | continue; | 106 | continue; |
107 | 107 | ||
108 | if (signalled() && (server->flags & NFS_MOUNT_INTR)) | 108 | if (fatal_signal_pending(current)) |
109 | return ERR_PTR(-ERESTARTSYS); | 109 | return ERR_PTR(-ERESTARTSYS); |
110 | current->policy = SCHED_YIELD; | 110 | current->policy = SCHED_YIELD; |
111 | schedule(); | 111 | schedule(); |