提交 469eb4d0 编写于 作者: A Andrew Morton 提交者: Linus Torvalds

[PATCH] filemap_fdatawrite_range() api: clarify -end parameter

I had trouble understanding working out whether filemap_fdatawrite_range()'s
`end' parameter describes the last-byte-to-be-written or the last-plus-one.
Clarify that in comments.
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 604bf5a2
...@@ -175,7 +175,7 @@ static int sync_page(void *word) ...@@ -175,7 +175,7 @@ static int sync_page(void *word)
* dirty pages that lie within the byte offsets <start, end> * dirty pages that lie within the byte offsets <start, end>
* @mapping: address space structure to write * @mapping: address space structure to write
* @start: offset in bytes where the range starts * @start: offset in bytes where the range starts
* @end: offset in bytes where the range ends * @end: offset in bytes where the range ends (inclusive)
* @sync_mode: enable synchronous operation * @sync_mode: enable synchronous operation
* *
* If sync_mode is WB_SYNC_ALL then this is a "data integrity" operation, as * If sync_mode is WB_SYNC_ALL then this is a "data integrity" operation, as
...@@ -368,6 +368,12 @@ int filemap_write_and_wait(struct address_space *mapping) ...@@ -368,6 +368,12 @@ int filemap_write_and_wait(struct address_space *mapping)
} }
EXPORT_SYMBOL(filemap_write_and_wait); EXPORT_SYMBOL(filemap_write_and_wait);
/*
* Write out and wait upon file offsets lstart->lend, inclusive.
*
* Note that `lend' is inclusive (describes the last byte to be written) so
* that this function can be used to write to the very end-of-file (end = -1).
*/
int filemap_write_and_wait_range(struct address_space *mapping, int filemap_write_and_wait_range(struct address_space *mapping,
loff_t lstart, loff_t lend) loff_t lstart, loff_t lend)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册