public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* filemap_fdatawait() wait_on_page_writeback_range(mapping, 0, -1)?
@ 2004-08-19 20:17 Marcelo Tosatti
  2004-08-19 21:49 ` Andrew Morton
  0 siblings, 1 reply; 5+ messages in thread
From: Marcelo Tosatti @ 2004-08-19 20:17 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel

Hi Andrew,

I dont understand why we do call wait_on_page_writeback_range() with -1 
as the "end" argument.

Is there a good reason for that? I bet so...

-1 sounds pretty stupid at first, it does unnecessary calls to 
the radix lookup code.

--- a/mm/filemap.c.orig      2004-08-19 14:36:02.000000000 -0300
+++ b/mm/filemap.c.isize     2004-08-19 18:17:14.000000000 -0300
@@ -231,7 +231,7 @@
  */
 int filemap_fdatawait(struct address_space *mapping)
 
-       return wait_on_page_writeback_range(mapping, 0, -1);
+       return wait_on_page_writeback_range(mapping, 0, i_size_read(mapping->host));
 }
  
 EXPORT_SYMBOL(filemap_fdatawait);


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-08-20  8:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-19 20:17 filemap_fdatawait() wait_on_page_writeback_range(mapping, 0, -1)? Marcelo Tosatti
2004-08-19 21:49 ` Andrew Morton
2004-08-19 22:13   ` Marcelo Tosatti
2004-08-19 23:33     ` Andrew Morton
     [not found]   ` <1092990808.20987.8.camel@imp.csi.cam.ac.uk>
2004-08-20  8:36     ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox