aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_aops.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_aops.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_aops.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c
index c097e4e69768..fd4105d662e0 100644
--- a/fs/xfs/linux-2.6/xfs_aops.c
+++ b/fs/xfs/linux-2.6/xfs_aops.c
@@ -1010,6 +1010,8 @@ xfs_page_state_convert(
1010 if (buffer_unwritten(bh) || buffer_delay(bh) || 1010 if (buffer_unwritten(bh) || buffer_delay(bh) ||
1011 ((buffer_uptodate(bh) || PageUptodate(page)) && 1011 ((buffer_uptodate(bh) || PageUptodate(page)) &&
1012 !buffer_mapped(bh) && (unmapped || startio))) { 1012 !buffer_mapped(bh) && (unmapped || startio))) {
1013 int new_ioend = 0;
1014
1013 /* 1015 /*
1014 * Make sure we don't use a read-only iomap 1016 * Make sure we don't use a read-only iomap
1015 */ 1017 */
@@ -1028,6 +1030,15 @@ xfs_page_state_convert(
1028 } 1030 }
1029 1031
1030 if (!iomap_valid) { 1032 if (!iomap_valid) {
1033 /*
1034 * if we didn't have a valid mapping then we
1035 * need to ensure that we put the new mapping
1036 * in a new ioend structure. This needs to be
1037 * done to ensure that the ioends correctly
1038 * reflect the block mappings at io completion
1039 * for unwritten extent conversion.
1040 */
1041 new_ioend = 1;
1031 if (type == IOMAP_NEW) { 1042 if (type == IOMAP_NEW) {
1032 size = xfs_probe_cluster(inode, 1043 size = xfs_probe_cluster(inode,
1033 page, bh, head, 0); 1044 page, bh, head, 0);
@@ -1047,7 +1058,7 @@ xfs_page_state_convert(
1047 if (startio) { 1058 if (startio) {
1048 xfs_add_to_ioend(inode, bh, offset, 1059 xfs_add_to_ioend(inode, bh, offset,
1049 type, &ioend, 1060 type, &ioend,
1050 !iomap_valid); 1061 new_ioend);
1051 } else { 1062 } else {
1052 set_buffer_dirty(bh); 1063 set_buffer_dirty(bh);
1053 unlock_buffer(bh); 1064 unlock_buffer(bh);