diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2014-09-09 16:49:28 +0200 | 
|---|---|---|
| committer | Arnd Bergmann <arnd@arndb.de> | 2014-09-09 16:49:28 +0200 | 
| commit | 87e9d8fd26c782623b79f2968431179f29b339f2 (patch) | |
| tree | 45e2cf70f4609ee82859d28dd8a34effc750a6c5 /fs/nfs/write.c | |
| parent | facdb3dd378e81b8516a8faa061e0be56d2ae7be (diff) | |
| parent | 75a41826e2c5dc1dc0fd5195fc29b031c97337af (diff) | |
Merge tag 'socfpga_update_for_v3.18' of git://git.rocketboards.org/linux-socfpga-next into next/dt
Pull "arm: dts: Add Altera SDRAM EDAC bindings & devicetree entries" From Dinh Nguyen:
5 of the 6 patches are DTS updates and the 1 patch is updating
the MAINTAINERS entry with my new email address.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
* tag 'socfpga_update_for_v3.18' of git://git.rocketboards.org/linux-socfpga-next:
  arm: dts: Add Altera SDRAM EDAC bindings & devicetree entries.
  ARM: dts: socfpga: memreserve first 4KB for future system use
  ARM: dts: socfpga: Add SD card detect
  ARM: dts: socfpga: remove extra alias in the ArriaV devkit
  ARM: dts: socfpga: unuse the slot-node and deprecate the supports-highspeed for dw-mmc
  MAINTAINERS: update entries for ARM/SOCFPGA platform
Diffstat (limited to 'fs/nfs/write.c')
| -rw-r--r-- | fs/nfs/write.c | 21 | 
1 files changed, 17 insertions, 4 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index e3b5cf28bdc5..175d5d073ccf 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -241,7 +241,7 @@ static bool nfs_page_group_covers_page(struct nfs_page *req)  	unsigned int pos = 0;  	unsigned int len = nfs_page_length(req->wb_page); -	nfs_page_group_lock(req, true); +	nfs_page_group_lock(req, false);  	do {  		tmp = nfs_page_group_search_locked(req->wb_head, pos); @@ -478,10 +478,23 @@ try_again:  		return NULL;  	} -	/* lock each request in the page group */ -	ret = nfs_page_group_lock(head, false); -	if (ret < 0) +	/* holding inode lock, so always make a non-blocking call to try the +	 * page group lock */ +	ret = nfs_page_group_lock(head, true); +	if (ret < 0) { +		spin_unlock(&inode->i_lock); + +		if (!nonblock && ret == -EAGAIN) { +			nfs_page_group_lock_wait(head); +			nfs_release_request(head); +			goto try_again; +		} + +		nfs_release_request(head);  		return ERR_PTR(ret); +	} + +	/* lock each request in the page group */  	subreq = head;  	do {  		/*  | 
