diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-08 12:49:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-08 12:49:23 -0400 |
commit | 25641c0c8d72f3d235c022fd2c19181912c2ae8b (patch) | |
tree | c8970effb0f33eb870777031162de5d1bfd0ec08 /kernel/sched | |
parent | ef0625b70dac9405ac9d9928cf767108041a9e51 (diff) | |
parent | 72c23f0819977d37924af92a42a9b7fbfd1c95d8 (diff) |
Merge tag 'nfs-for-3.18-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull NFS client updates from Trond Myklebust:
"Highlights include:
Stable fixes:
- fix an NFSv4.1 state renewal regression
- fix open/lock state recovery error handling
- fix lock recovery when CREATE_SESSION/SETCLIENTID_CONFIRM fails
- fix statd when reconnection fails
- don't wake tasks during connection abort
- don't start reboot recovery if lease check fails
- fix duplicate proc entries
Features:
- pNFS block driver fixes and clean ups from Christoph
- More code cleanups from Anna
- Improve mmap() writeback performance
- Replace use of PF_TRANS with a more generic mechanism for avoiding
deadlocks in nfs_release_page"
* tag 'nfs-for-3.18-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (66 commits)
NFSv4.1: Fix an NFSv4.1 state renewal regression
NFSv4: fix open/lock state recovery error handling
NFSv4: Fix lock recovery when CREATE_SESSION/SETCLIENTID_CONFIRM fails
NFS: Fabricate fscache server index key correctly
SUNRPC: Add missing support for RPC_CLNT_CREATE_NO_RETRANS_TIMEOUT
NFSv3: Fix missing includes of nfs3_fs.h
NFS/SUNRPC: Remove other deadlock-avoidance mechanisms in nfs_release_page()
NFS: avoid waiting at all in nfs_release_page when congested.
NFS: avoid deadlocks with loop-back mounted NFS filesystems.
MM: export page_wakeup functions
SCHED: add some "wait..on_bit...timeout()" interfaces.
NFS: don't use STABLE writes during writeback.
NFSv4: use exponential retry on NFS4ERR_DELAY for async requests.
rpc: Add -EPERM processing for xs_udp_send_request()
rpc: return sent and err from xs_sendpages()
lockd: Try to reconnect if statd has moved
SUNRPC: Don't wake tasks during connection abort
Fixing lease renewal
nfs: fix duplicate proc entries
pnfs/blocklayout: Fix a 64-bit division/remainder issue in bl_map_stripe
...
Diffstat (limited to 'kernel/sched')
-rw-r--r-- | kernel/sched/wait.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/kernel/sched/wait.c b/kernel/sched/wait.c index 15cab1a4f84e..5a62915f47a8 100644 --- a/kernel/sched/wait.c +++ b/kernel/sched/wait.c | |||
@@ -343,6 +343,18 @@ int __sched out_of_line_wait_on_bit(void *word, int bit, | |||
343 | } | 343 | } |
344 | EXPORT_SYMBOL(out_of_line_wait_on_bit); | 344 | EXPORT_SYMBOL(out_of_line_wait_on_bit); |
345 | 345 | ||
346 | int __sched out_of_line_wait_on_bit_timeout( | ||
347 | void *word, int bit, wait_bit_action_f *action, | ||
348 | unsigned mode, unsigned long timeout) | ||
349 | { | ||
350 | wait_queue_head_t *wq = bit_waitqueue(word, bit); | ||
351 | DEFINE_WAIT_BIT(wait, word, bit); | ||
352 | |||
353 | wait.key.timeout = jiffies + timeout; | ||
354 | return __wait_on_bit(wq, &wait, action, mode); | ||
355 | } | ||
356 | EXPORT_SYMBOL_GPL(out_of_line_wait_on_bit_timeout); | ||
357 | |||
346 | int __sched | 358 | int __sched |
347 | __wait_on_bit_lock(wait_queue_head_t *wq, struct wait_bit_queue *q, | 359 | __wait_on_bit_lock(wait_queue_head_t *wq, struct wait_bit_queue *q, |
348 | wait_bit_action_f *action, unsigned mode) | 360 | wait_bit_action_f *action, unsigned mode) |
@@ -520,3 +532,27 @@ __sched int bit_wait_io(struct wait_bit_key *word) | |||
520 | return 0; | 532 | return 0; |
521 | } | 533 | } |
522 | EXPORT_SYMBOL(bit_wait_io); | 534 | EXPORT_SYMBOL(bit_wait_io); |
535 | |||
536 | __sched int bit_wait_timeout(struct wait_bit_key *word) | ||
537 | { | ||
538 | unsigned long now = ACCESS_ONCE(jiffies); | ||
539 | if (signal_pending_state(current->state, current)) | ||
540 | return 1; | ||
541 | if (time_after_eq(now, word->timeout)) | ||
542 | return -EAGAIN; | ||
543 | schedule_timeout(word->timeout - now); | ||
544 | return 0; | ||
545 | } | ||
546 | EXPORT_SYMBOL_GPL(bit_wait_timeout); | ||
547 | |||
548 | __sched int bit_wait_io_timeout(struct wait_bit_key *word) | ||
549 | { | ||
550 | unsigned long now = ACCESS_ONCE(jiffies); | ||
551 | if (signal_pending_state(current->state, current)) | ||
552 | return 1; | ||
553 | if (time_after_eq(now, word->timeout)) | ||
554 | return -EAGAIN; | ||
555 | io_schedule_timeout(word->timeout - now); | ||
556 | return 0; | ||
557 | } | ||
558 | EXPORT_SYMBOL_GPL(bit_wait_io_timeout); | ||