Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

[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
Loading
Loading
Loading
Loading
+9 −9
Original line number Original line Diff line number Diff line
@@ -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);
@@ -959,9 +961,7 @@ xfs_page_state_convert(
				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;