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 /mm/filemap.c | |
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 'mm/filemap.c')
-rw-r--r-- | mm/filemap.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index 8554d20b3523..0ab0a3ea5721 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -670,17 +670,13 @@ EXPORT_SYMBOL(__page_cache_alloc); | |||
670 | * at a cost of "thundering herd" phenomena during rare hash | 670 | * at a cost of "thundering herd" phenomena during rare hash |
671 | * collisions. | 671 | * collisions. |
672 | */ | 672 | */ |
673 | static wait_queue_head_t *page_waitqueue(struct page *page) | 673 | wait_queue_head_t *page_waitqueue(struct page *page) |
674 | { | 674 | { |
675 | const struct zone *zone = page_zone(page); | 675 | const struct zone *zone = page_zone(page); |
676 | 676 | ||
677 | return &zone->wait_table[hash_ptr(page, zone->wait_table_bits)]; | 677 | return &zone->wait_table[hash_ptr(page, zone->wait_table_bits)]; |
678 | } | 678 | } |
679 | 679 | EXPORT_SYMBOL(page_waitqueue); | |
680 | static inline void wake_up_page(struct page *page, int bit) | ||
681 | { | ||
682 | __wake_up_bit(page_waitqueue(page), &page->flags, bit); | ||
683 | } | ||
684 | 680 | ||
685 | void wait_on_page_bit(struct page *page, int bit_nr) | 681 | void wait_on_page_bit(struct page *page, int bit_nr) |
686 | { | 682 | { |
@@ -703,6 +699,19 @@ int wait_on_page_bit_killable(struct page *page, int bit_nr) | |||
703 | bit_wait_io, TASK_KILLABLE); | 699 | bit_wait_io, TASK_KILLABLE); |
704 | } | 700 | } |
705 | 701 | ||
702 | int wait_on_page_bit_killable_timeout(struct page *page, | ||
703 | int bit_nr, unsigned long timeout) | ||
704 | { | ||
705 | DEFINE_WAIT_BIT(wait, &page->flags, bit_nr); | ||
706 | |||
707 | wait.key.timeout = jiffies + timeout; | ||
708 | if (!test_bit(bit_nr, &page->flags)) | ||
709 | return 0; | ||
710 | return __wait_on_bit(page_waitqueue(page), &wait, | ||
711 | bit_wait_io_timeout, TASK_KILLABLE); | ||
712 | } | ||
713 | EXPORT_SYMBOL_GPL(wait_on_page_bit_killable_timeout); | ||
714 | |||
706 | /** | 715 | /** |
707 | * add_page_wait_queue - Add an arbitrary waiter to a page's wait queue | 716 | * add_page_wait_queue - Add an arbitrary waiter to a page's wait queue |
708 | * @page: Page defining the wait queue of interest | 717 | * @page: Page defining the wait queue of interest |