summaryrefslogtreecommitdiffstats
path: root/mm/truncate.c
diff options
context:
space:
mode:
authorIgor Mammedov <niallain@gmail.com>2008-04-29 01:08:21 +0200
committerSteve French <sfrench@us.ibm.com>2008-04-29 01:08:21 +0200
commite9f20d6f03e8df393b001dab6dc5226c2a5daf57 (patch)
tree73e94fa5e4f83576c97e36187b809c5aad2ade30 /mm/truncate.c
parent[CIFS] fixed compatibility issue with samba refferal request (diff)
parentMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus (diff)
downloadlinux-e9f20d6f03e8df393b001dab6dc5226c2a5daf57.tar.xz
linux-e9f20d6f03e8df393b001dab6dc5226c2a5daf57.zip
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'mm/truncate.c')
-rw-r--r--mm/truncate.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/mm/truncate.c b/mm/truncate.c
index 7d20ce41ecf5..b8961cb63414 100644
--- a/mm/truncate.c
+++ b/mm/truncate.c
@@ -391,6 +391,7 @@ int invalidate_inode_pages2_range(struct address_space *mapping,
pgoff_t next;
int i;
int ret = 0;
+ int ret2 = 0;
int did_range_unmap = 0;
int wrapped = 0;
@@ -438,9 +439,13 @@ int invalidate_inode_pages2_range(struct address_space *mapping,
}
}
BUG_ON(page_mapped(page));
- ret = do_launder_page(mapping, page);
- if (ret == 0 && !invalidate_complete_page2(mapping, page))
- ret = -EIO;
+ ret2 = do_launder_page(mapping, page);
+ if (ret2 == 0) {
+ if (!invalidate_complete_page2(mapping, page))
+ ret2 = -EIO;
+ }
+ if (ret2 < 0)
+ ret = ret2;
unlock_page(page);
}
pagevec_release(&pvec);