Commit 8272145c authored by Nathan Scott's avatar Nathan Scott

[XFS] Fix a writepage regression where we accidentally stopped honouring

nonblock mode with the new IO path code (since 2.6.16).

SGI-PV: 951662
SGI-Modid: xfs-linux-melb:xfs-kern:25676a
Signed-off-by: default avatarNathan Scott <nathans@sgi.com>
parent e50bd16f
...@@ -870,12 +870,14 @@ xfs_page_state_convert( ...@@ -870,12 +870,14 @@ xfs_page_state_convert(
pgoff_t end_index, last_index, tlast; pgoff_t end_index, last_index, tlast;
ssize_t size, len; ssize_t size, len;
int flags, err, iomap_valid = 0, uptodate = 1; int flags, err, iomap_valid = 0, uptodate = 1;
int page_dirty, count = 0, trylock_flag = 0; int page_dirty, count = 0;
int trylock = 0;
int all_bh = unmapped; int all_bh = unmapped;
/* wait for other IO threads? */ if (startio) {
if (startio && (wbc->sync_mode == WB_SYNC_NONE && wbc->nonblocking)) if (wbc->sync_mode == WB_SYNC_NONE && wbc->nonblocking)
trylock_flag |= BMAPI_TRYLOCK; trylock |= BMAPI_TRYLOCK;
}
/* Is this page beyond the end of the file? */ /* Is this page beyond the end of the file? */
offset = i_size_read(inode); offset = i_size_read(inode);
...@@ -956,15 +958,13 @@ xfs_page_state_convert( ...@@ -956,15 +958,13 @@ xfs_page_state_convert(
if (buffer_unwritten(bh)) { if (buffer_unwritten(bh)) {
type = IOMAP_UNWRITTEN; type = IOMAP_UNWRITTEN;
flags = BMAPI_WRITE|BMAPI_IGNSTATE; flags = BMAPI_WRITE | BMAPI_IGNSTATE;
} else if (buffer_delay(bh)) { } else if (buffer_delay(bh)) {
type = IOMAP_DELAY; type = IOMAP_DELAY;
flags = BMAPI_ALLOCATE; flags = BMAPI_ALLOCATE | trylock;
if (!startio)
flags |= trylock_flag;
} else { } else {
type = IOMAP_NEW; type = IOMAP_NEW;
flags = BMAPI_WRITE|BMAPI_MMAP; flags = BMAPI_WRITE | BMAPI_MMAP;
} }
if (!iomap_valid) { if (!iomap_valid) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment