* [PATCH 2/2] Remove do_sync_file_range()
@ 2007-03-21 22:02 Mark Fasheh
0 siblings, 0 replies; only message in thread
From: Mark Fasheh @ 2007-03-21 22:02 UTC (permalink / raw)
To: akpm, linux-kernel; +Cc: linux-fsdevel, hch, viro
Remove do_sync_file_range() and convert callers to just use
do_sync_mapping_range().
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
---
drivers/md/bitmap.c | 8 ++++----
fs/sync.c | 2 +-
include/linux/fs.h | 5 -----
mm/filemap.c | 8 ++++----
4 files changed, 9 insertions(+), 14 deletions(-)
19e0a73af3081eb606b648bb7065be4bd0c5e6ab
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
index 5554ada..aa5b0ef 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -1458,10 +1458,10 @@ int bitmap_create(mddev_t *mddev)
bitmap->offset = mddev->bitmap_offset;
if (file) {
get_file(file);
- do_sync_file_range(file, 0, LLONG_MAX,
- SYNC_FILE_RANGE_WAIT_BEFORE |
- SYNC_FILE_RANGE_WRITE |
- SYNC_FILE_RANGE_WAIT_AFTER);
+ do_sync_mapping_range(file->f_mapping, 0, LLONG_MAX,
+ SYNC_FILE_RANGE_WAIT_BEFORE |
+ SYNC_FILE_RANGE_WRITE |
+ SYNC_FILE_RANGE_WAIT_AFTER);
}
/* read superblock from bitmap file (this sets bitmap->chunksize) */
err = bitmap_read_sb(bitmap);
diff --git a/fs/sync.c b/fs/sync.c
index 5cb9e7e..2f97576 100644
--- a/fs/sync.c
+++ b/fs/sync.c
@@ -229,7 +229,7 @@ asmlinkage long sys_sync_file_range(int
!S_ISLNK(i_mode))
goto out_put;
- ret = do_sync_file_range(file, offset, endbyte, flags);
+ ret = do_sync_mapping_range(file->f_mapping, offset, endbyte, flags);
out_put:
fput_light(file, fput_needed);
out:
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 095a9c9..b0c58a6 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -845,11 +845,6 @@ extern int fcntl_getlease(struct file *f
/* fs/sync.c */
extern int do_sync_mapping_range(struct address_space *mapping, loff_t offset,
loff_t endbyte, unsigned int flags);
-static inline int do_sync_file_range(struct file *file, loff_t offset,
- loff_t endbyte, unsigned int flags)
-{
- return do_sync_mapping_range(file->f_mapping, offset, endbyte, flags);
-}
/* fs/locks.c */
extern void locks_init_lock(struct file_lock *);
diff --git a/mm/filemap.c b/mm/filemap.c
index 5dfc093..e232056 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -2294,10 +2294,10 @@ __generic_file_aio_write_nolock(struct k
* semantics.
*/
endbyte = pos + written_buffered - written - 1;
- err = do_sync_file_range(file, pos, endbyte,
- SYNC_FILE_RANGE_WAIT_BEFORE|
- SYNC_FILE_RANGE_WRITE|
- SYNC_FILE_RANGE_WAIT_AFTER);
+ err = do_sync_mapping_range(file->f_mapping, pos, endbyte,
+ SYNC_FILE_RANGE_WAIT_BEFORE|
+ SYNC_FILE_RANGE_WRITE|
+ SYNC_FILE_RANGE_WAIT_AFTER);
if (err == 0) {
written = written_buffered;
invalidate_mapping_pages(mapping,
--
1.3.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-03-21 22:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-21 22:02 [PATCH 2/2] Remove do_sync_file_range() Mark Fasheh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).