diff options
| author | Ingo Molnar <mingo@elte.hu> | 2009-05-11 14:44:27 +0200 | 
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-05-11 14:44:31 +0200 | 
| commit | 41fb454ebe6024f5c1e3b3cbc0abc0da762e7b51 (patch) | |
| tree | 51c50bcb67a5039448ddfa1869d7948cab1217e9 /fs/xfs/linux-2.6/xfs_lrw.c | |
| parent | 19c1a6f5764d787113fa323ffb18be7991208f82 (diff) | |
| parent | 091bf7624d1c90cec9e578a18529f615213ff847 (diff) | |
Merge commit 'v2.6.30-rc5' into core/iommu
Merge reason: core/iommu was on an .30-rc1 base,
              update it to .30-rc5 to refresh.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_lrw.c')
| -rw-r--r-- | fs/xfs/linux-2.6/xfs_lrw.c | 18 | 
1 files changed, 17 insertions, 1 deletions
diff --git a/fs/xfs/linux-2.6/xfs_lrw.c b/fs/xfs/linux-2.6/xfs_lrw.c index 7e90daa0d1d..9142192ccbe 100644 --- a/fs/xfs/linux-2.6/xfs_lrw.c +++ b/fs/xfs/linux-2.6/xfs_lrw.c @@ -751,10 +751,26 @@ start:  			goto relock;  		}  	} else { +		int enospc = 0; +		ssize_t ret2 = 0; + +write_retry:  		xfs_rw_enter_trace(XFS_WRITE_ENTER, xip, (void *)iovp, segs,  				*offset, ioflags); -		ret = generic_file_buffered_write(iocb, iovp, segs, +		ret2 = generic_file_buffered_write(iocb, iovp, segs,  				pos, offset, count, ret); +		/* +		 * if we just got an ENOSPC, flush the inode now we +		 * aren't holding any page locks and retry *once* +		 */ +		if (ret2 == -ENOSPC && !enospc) { +			error = xfs_flush_pages(xip, 0, -1, 0, FI_NONE); +			if (error) +				goto out_unlock_internal; +			enospc = 1; +			goto write_retry; +		} +		ret = ret2;  	}  	current->backing_dev_info = NULL;  | 
