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>
This commit is contained in:
parent
1a0ba9ae48
commit
91e59c368c
1 changed files with 0 additions and 30 deletions
|
@ -594,34 +594,6 @@ static inline int nfs_scan_commit(struct inode *inode, struct list_head *dst, un
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int nfs_wait_on_write_congestion(struct address_space *mapping)
|
|
||||||
{
|
|
||||||
struct inode *inode = mapping->host;
|
|
||||||
struct backing_dev_info *bdi = mapping->backing_dev_info;
|
|
||||||
int ret = 0;
|
|
||||||
|
|
||||||
might_sleep();
|
|
||||||
|
|
||||||
if (!bdi_write_congested(bdi))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
nfs_inc_stats(inode, NFSIOS_CONGESTIONWAIT);
|
|
||||||
|
|
||||||
do {
|
|
||||||
struct rpc_clnt *clnt = NFS_CLIENT(inode);
|
|
||||||
sigset_t oldset;
|
|
||||||
|
|
||||||
rpc_clnt_sigmask(clnt, &oldset);
|
|
||||||
ret = congestion_wait_interruptible(WRITE, HZ/10);
|
|
||||||
rpc_clnt_sigunmask(clnt, &oldset);
|
|
||||||
if (ret == -ERESTARTSYS)
|
|
||||||
break;
|
|
||||||
ret = 0;
|
|
||||||
} while (bdi_write_congested(bdi));
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Try to update any existing write request, or create one if there is none.
|
* Try to update any existing write request, or create one if there is none.
|
||||||
* In order to match, the request's credentials must match those of
|
* 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,
|
||||||
|
|
||||||
end = offset + bytes;
|
end = offset + bytes;
|
||||||
|
|
||||||
if (nfs_wait_on_write_congestion(mapping))
|
|
||||||
return ERR_PTR(-ERESTARTSYS);
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
/* Loop over all inode entries and see if we find
|
/* Loop over all inode entries and see if we find
|
||||||
* A request for the page we wish to update
|
* A request for the page we wish to update
|
||||||
|
|
Loading…
Add table
Reference in a new issue