Commit ef51c976 authored by Mark Fasheh's avatar Mark Fasheh Committed by Linus Torvalds

Remove do_sync_file_range()

Remove do_sync_file_range() and convert callers to just use
do_sync_mapping_range().
Signed-off-by: default avatarMark Fasheh <mark.fasheh@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 524e6752
...@@ -1456,10 +1456,10 @@ int bitmap_create(mddev_t *mddev) ...@@ -1456,10 +1456,10 @@ int bitmap_create(mddev_t *mddev)
bitmap->offset = mddev->bitmap_offset; bitmap->offset = mddev->bitmap_offset;
if (file) { if (file) {
get_file(file); get_file(file);
do_sync_file_range(file, 0, LLONG_MAX, do_sync_mapping_range(file->f_mapping, 0, LLONG_MAX,
SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WAIT_BEFORE |
SYNC_FILE_RANGE_WRITE | SYNC_FILE_RANGE_WRITE |
SYNC_FILE_RANGE_WAIT_AFTER); SYNC_FILE_RANGE_WAIT_AFTER);
} }
/* read superblock from bitmap file (this sets bitmap->chunksize) */ /* read superblock from bitmap file (this sets bitmap->chunksize) */
err = bitmap_read_sb(bitmap); err = bitmap_read_sb(bitmap);
......
...@@ -229,7 +229,7 @@ asmlinkage long sys_sync_file_range(int fd, loff_t offset, loff_t nbytes, ...@@ -229,7 +229,7 @@ asmlinkage long sys_sync_file_range(int fd, loff_t offset, loff_t nbytes,
!S_ISLNK(i_mode)) !S_ISLNK(i_mode))
goto out_put; 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: out_put:
fput_light(file, fput_needed); fput_light(file, fput_needed);
out: out:
......
...@@ -849,11 +849,6 @@ extern int fcntl_getlease(struct file *filp); ...@@ -849,11 +849,6 @@ extern int fcntl_getlease(struct file *filp);
/* fs/sync.c */ /* fs/sync.c */
extern int do_sync_mapping_range(struct address_space *mapping, loff_t offset, extern int do_sync_mapping_range(struct address_space *mapping, loff_t offset,
loff_t endbyte, unsigned int flags); 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 */ /* fs/locks.c */
extern void locks_init_lock(struct file_lock *); extern void locks_init_lock(struct file_lock *);
......
...@@ -2309,10 +2309,10 @@ __generic_file_aio_write_nolock(struct kiocb *iocb, const struct iovec *iov, ...@@ -2309,10 +2309,10 @@ __generic_file_aio_write_nolock(struct kiocb *iocb, const struct iovec *iov,
* semantics. * semantics.
*/ */
endbyte = pos + written_buffered - written - 1; endbyte = pos + written_buffered - written - 1;
err = do_sync_file_range(file, pos, endbyte, err = do_sync_mapping_range(file->f_mapping, pos, endbyte,
SYNC_FILE_RANGE_WAIT_BEFORE| SYNC_FILE_RANGE_WAIT_BEFORE|
SYNC_FILE_RANGE_WRITE| SYNC_FILE_RANGE_WRITE|
SYNC_FILE_RANGE_WAIT_AFTER); SYNC_FILE_RANGE_WAIT_AFTER);
if (err == 0) { if (err == 0) {
written = written_buffered; written = written_buffered;
invalidate_mapping_pages(mapping, invalidate_mapping_pages(mapping,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment