diff options
| -rw-r--r-- | fs/nfs/write.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 8593965a35ef..dbad89c8e427 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c | |||
| @@ -594,34 +594,6 @@ static inline int nfs_scan_commit(struct inode *inode, struct list_head *dst, un | |||
| 594 | } | 594 | } |
| 595 | #endif | 595 | #endif |
| 596 | 596 | ||
| 597 | static int nfs_wait_on_write_congestion(struct address_space *mapping) | ||
| 598 | { | ||
| 599 | struct inode *inode = mapping->host; | ||
| 600 | struct backing_dev_info *bdi = mapping->backing_dev_info; | ||
| 601 | int ret = 0; | ||
| 602 | |||
| 603 | might_sleep(); | ||
| 604 | |||
| 605 | if (!bdi_write_congested(bdi)) | ||
| 606 | return 0; | ||
| 607 | |||
| 608 | nfs_inc_stats(inode, NFSIOS_CONGESTIONWAIT); | ||
| 609 | |||
| 610 | do { | ||
| 611 | struct rpc_clnt *clnt = NFS_CLIENT(inode); | ||
| 612 | sigset_t oldset; | ||
| 613 | |||
| 614 | rpc_clnt_sigmask(clnt, &oldset); | ||
| 615 | ret = congestion_wait_interruptible(WRITE, HZ/10); | ||
| 616 | rpc_clnt_sigunmask(clnt, &oldset); | ||
| 617 | if (ret == -ERESTARTSYS) | ||
| 618 | break; | ||
| 619 | ret = 0; | ||
| 620 | } while (bdi_write_congested(bdi)); | ||
| 621 | |||
| 622 | return ret; | ||
| 623 | } | ||
| 624 | |||
| 625 | /* | 597 | /* |
| 626 | * Try to update any existing write request, or create one if there is none. | 598 | * Try to update any existing write request, or create one if there is none. |
| 627 | * In order to match, the request's credentials must match those of | 599 | * In order to match, the request's credentials must match those of |
| @@ -640,8 +612,6 @@ static struct nfs_page * nfs_update_request(struct nfs_open_context* ctx, | |||
| 640 | 612 | ||
| 641 | end = offset + bytes; | 613 | end = offset + bytes; |
| 642 | 614 | ||
| 643 | if (nfs_wait_on_write_congestion(mapping)) | ||
| 644 | return ERR_PTR(-ERESTARTSYS); | ||
| 645 | for (;;) { | 615 | for (;;) { |
| 646 | /* Loop over all inode entries and see if we find | 616 | /* Loop over all inode entries and see if we find |
| 647 | * A request for the page we wish to update | 617 | * A request for the page we wish to update |
