diff mbox

[1/1] mm: invalidate_mapping_pages checks boundaries when lock fails

Message ID 1266542537-5040-1-git-send-email-yehuda@hq.newdream.net (mailing list archive)
State Not Applicable
Headers show

Commit Message

Yehuda Sadeh Feb. 19, 2010, 1:22 a.m. UTC
None
diff mbox

Patch

diff --git a/mm/truncate.c b/mm/truncate.c
index 450cebd..abb67d4 100644
--- a/mm/truncate.c
+++ b/mm/truncate.c
@@ -345,11 +345,12 @@  unsigned long invalidate_mapping_pages(struct address_space *mapping,
 				next = index;
 			next++;
 			if (lock_failed)
-				continue;
+				goto unlocked;
 
 			ret += invalidate_inode_page(page);
 
 			unlock_page(page);
+unlocked:
 			if (next > end)
 				break;
 		}