Skip to content

Commit

Permalink
[XFS] Fix a writepage regression where we accidentally stopped honouring
Browse files Browse the repository at this point in the history
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: Nathan Scott <nathans@sgi.com>
  • Loading branch information
Nathan Scott committed Apr 11, 2006
1 parent e50bd16 commit 8272145
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions fs/xfs/linux-2.6/xfs_aops.c
Original file line number Diff line number Diff line change
Expand Up @@ -870,12 +870,14 @@ xfs_page_state_convert(
pgoff_t end_index, last_index, tlast;
ssize_t size, len;
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;

/* wait for other IO threads? */
if (startio && (wbc->sync_mode == WB_SYNC_NONE && wbc->nonblocking))
trylock_flag |= BMAPI_TRYLOCK;
if (startio) {
if (wbc->sync_mode == WB_SYNC_NONE && wbc->nonblocking)
trylock |= BMAPI_TRYLOCK;
}

/* Is this page beyond the end of the file? */
offset = i_size_read(inode);
Expand Down Expand Up @@ -956,15 +958,13 @@ xfs_page_state_convert(

if (buffer_unwritten(bh)) {
type = IOMAP_UNWRITTEN;
flags = BMAPI_WRITE|BMAPI_IGNSTATE;
flags = BMAPI_WRITE | BMAPI_IGNSTATE;
} else if (buffer_delay(bh)) {
type = IOMAP_DELAY;
flags = BMAPI_ALLOCATE;
if (!startio)
flags |= trylock_flag;
flags = BMAPI_ALLOCATE | trylock;
} else {
type = IOMAP_NEW;
flags = BMAPI_WRITE|BMAPI_MMAP;
flags = BMAPI_WRITE | BMAPI_MMAP;
}

if (!iomap_valid) {
Expand Down

0 comments on commit 8272145

Please sign in to comment.