aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2007-04-06 13:12:46 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-05-01 01:17:03 -0400
commit91e59c368c6ba5eed0369a085c42c9f270b97aa8 (patch)
tree172975fb2d21695e1d4d9b4146ac033bcfee872b
parent1a0ba9ae485c5fd17d0bff2f14d9dd75b8985593 (diff)
NFS: Don't wait for congestion in nfs_update_request()
It is redundant, and will interfere with the call to balance_dirty_pages_ratelimited_nr in generic_file_write(). Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r--fs/nfs/write.c30
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
597static 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