lkml.org 
[lkml]   [2005]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 6/6] export/change sync_page_range/_nolock()
From
Date
This exports/changes the sync_page_range/_nolock(). The fatfs needs
sync_page_range/_nolock() for expanding truncate, and changes "size_t
count" to "loff_t count".

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
---

include/linux/writeback.h | 4 +++-
mm/filemap.c | 8 ++++----
2 files changed, 7 insertions(+), 5 deletions(-)

diff -puN include/linux/writeback.h~export-sync_page_range_nolock include/linux/writeback.h
--- linux-2.6.14/include/linux/writeback.h~export-sync_page_range_nolock 2005-11-07 03:59:03.000000000 +0900
+++ linux-2.6.14-hirofumi/include/linux/writeback.h 2005-11-07 03:59:03.000000000 +0900
@@ -108,7 +108,9 @@ void balance_dirty_pages_ratelimited(str
int pdflush_operation(void (*fn)(unsigned long), unsigned long arg0);
int do_writepages(struct address_space *mapping, struct writeback_control *wbc);
int sync_page_range(struct inode *inode, struct address_space *mapping,
- loff_t pos, size_t count);
+ loff_t pos, loff_t count);
+int sync_page_range_nolock(struct inode *inode, struct address_space *mapping,
+ loff_t pos, loff_t count);

/* pdflush.c */
extern int nr_pdflush_threads; /* Global so it can be exported to sysctl
diff -puN mm/filemap.c~export-sync_page_range_nolock mm/filemap.c
--- linux-2.6.14/mm/filemap.c~export-sync_page_range_nolock 2005-11-07 03:59:03.000000000 +0900
+++ linux-2.6.14-hirofumi/mm/filemap.c 2005-11-07 03:59:03.000000000 +0900
@@ -280,7 +280,7 @@ static int wait_on_page_writeback_range(
* it is otherwise livelockable.
*/
int sync_page_range(struct inode *inode, struct address_space *mapping,
- loff_t pos, size_t count)
+ loff_t pos, loff_t count)
{
pgoff_t start = pos >> PAGE_CACHE_SHIFT;
pgoff_t end = (pos + count - 1) >> PAGE_CACHE_SHIFT;
@@ -305,9 +305,8 @@ EXPORT_SYMBOL(sync_page_range);
* as it forces O_SYNC writers to different parts of the same file
* to be serialised right until io completion.
*/
-static int sync_page_range_nolock(struct inode *inode,
- struct address_space *mapping,
- loff_t pos, size_t count)
+int sync_page_range_nolock(struct inode *inode, struct address_space *mapping,
+ loff_t pos, loff_t count)
{
pgoff_t start = pos >> PAGE_CACHE_SHIFT;
pgoff_t end = (pos + count - 1) >> PAGE_CACHE_SHIFT;
@@ -322,6 +321,7 @@ static int sync_page_range_nolock(struct
ret = wait_on_page_writeback_range(mapping, start, end);
return ret;
}
+EXPORT_SYMBOL(sync_page_range_nolock);

/**
* filemap_fdatawait - walk the list of under-writeback pages of the given
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-11-07 18:45    [W:0.050 / U:0.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site