mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
[PATCH] export/change sync_page_range/_nolock()
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> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
e5174baaea
commit
268fc16e34
2 changed files with 7 additions and 5 deletions
|
@ -103,7 +103,9 @@ void balance_dirty_pages_ratelimited(struct address_space *mapping);
|
||||||
int pdflush_operation(void (*fn)(unsigned long), unsigned long arg0);
|
int pdflush_operation(void (*fn)(unsigned long), unsigned long arg0);
|
||||||
int do_writepages(struct address_space *mapping, struct writeback_control *wbc);
|
int do_writepages(struct address_space *mapping, struct writeback_control *wbc);
|
||||||
int sync_page_range(struct inode *inode, struct address_space *mapping,
|
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 */
|
/* pdflush.c */
|
||||||
extern int nr_pdflush_threads; /* Global so it can be exported to sysctl
|
extern int nr_pdflush_threads; /* Global so it can be exported to sysctl
|
||||||
|
|
|
@ -280,7 +280,7 @@ static int wait_on_page_writeback_range(struct address_space *mapping,
|
||||||
* it is otherwise livelockable.
|
* it is otherwise livelockable.
|
||||||
*/
|
*/
|
||||||
int sync_page_range(struct inode *inode, struct address_space *mapping,
|
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 start = pos >> PAGE_CACHE_SHIFT;
|
||||||
pgoff_t end = (pos + count - 1) >> 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
|
* as it forces O_SYNC writers to different parts of the same file
|
||||||
* to be serialised right until io completion.
|
* to be serialised right until io completion.
|
||||||
*/
|
*/
|
||||||
static int sync_page_range_nolock(struct inode *inode,
|
int sync_page_range_nolock(struct inode *inode, struct address_space *mapping,
|
||||||
struct address_space *mapping,
|
loff_t pos, loff_t count)
|
||||||
loff_t pos, size_t count)
|
|
||||||
{
|
{
|
||||||
pgoff_t start = pos >> PAGE_CACHE_SHIFT;
|
pgoff_t start = pos >> PAGE_CACHE_SHIFT;
|
||||||
pgoff_t end = (pos + count - 1) >> PAGE_CACHE_SHIFT;
|
pgoff_t end = (pos + count - 1) >> PAGE_CACHE_SHIFT;
|
||||||
|
@ -322,6 +321,7 @@ static int sync_page_range_nolock(struct inode *inode,
|
||||||
ret = wait_on_page_writeback_range(mapping, start, end);
|
ret = wait_on_page_writeback_range(mapping, start, end);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL(sync_page_range_nolock);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* filemap_fdatawait - walk the list of under-writeback pages of the given
|
* filemap_fdatawait - walk the list of under-writeback pages of the given
|
||||||
|
|
Loading…
Add table
Reference in a new issue