Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 229021
b: refs/heads/master
c: 85da94c
h: refs/heads/master
i:
  229019: c3d1265
v: v3
  • Loading branch information
Christoph Hellwig authored and Alex Elder committed Dec 16, 2010
1 parent f483761 commit 01af66d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c9f71f5fc4390ea3a8087c00d53a799e7e0f0f8e
refs/heads/master: 85da94c6b4666582c38579ccdcd90a5d9b5697ef
21 changes: 12 additions & 9 deletions trunk/fs/xfs/linux-2.6/xfs_aops.c
Original file line number Diff line number Diff line change
Expand Up @@ -1082,17 +1082,17 @@ xfs_vm_writepage(
if (buffer_unwritten(bh) || buffer_delay(bh)) {
int new_ioend = 0;

/*
* Make sure we don't use a read-only iomap
*/
if (flags == BMAPI_READ)
imap_valid = 0;

if (buffer_unwritten(bh)) {
type = IO_UNWRITTEN;
if (type != IO_UNWRITTEN) {
type = IO_UNWRITTEN;
imap_valid = 0;
}
flags = BMAPI_WRITE | BMAPI_IGNSTATE;
} else if (buffer_delay(bh)) {
type = IO_DELAY;
if (type != IO_DELAY) {
type = IO_DELAY;
imap_valid = 0;
}
flags = BMAPI_ALLOCATE;

if (wbc->sync_mode == WB_SYNC_NONE)
Expand Down Expand Up @@ -1128,8 +1128,11 @@ xfs_vm_writepage(
* That means it must already have extents allocated
* underneath it. Map the extent by reading it.
*/
if (!imap_valid || flags != BMAPI_READ) {
if (flags != BMAPI_READ) {
flags = BMAPI_READ;
imap_valid = 0;
}
if (!imap_valid) {
size = xfs_probe_cluster(inode, page, bh, head);
err = xfs_map_blocks(inode, offset, size,
&imap, flags);
Expand Down

0 comments on commit 01af66d

Please sign in to comment.