From: Mark Fasheh Date: Tue, 8 May 2007 07:27:10 +0000 (-0700) Subject: Remove do_sync_file_range() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ef51c97623b94f51e439ac91d2736aab3d1b6594;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Remove do_sync_file_range() Remove do_sync_file_range() and convert callers to just use do_sync_mapping_range(). Signed-off-by: Mark Fasheh Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index e61e0efe9ec7..5a4a74c1097c 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c @@ -1456,10 +1456,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 5cb9e7e43383..2f97576355b8 100644 --- a/fs/sync.c +++ b/fs/sync.c @@ -229,7 +229,7 @@ asmlinkage long sys_sync_file_range(int fd, loff_t offset, loff_t nbytes, !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 527a09a82297..7cf0c54a46a7 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -849,11 +849,6 @@ extern int fcntl_getlease(struct file *filp); /* 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 3e49fe13d6ac..9cbf4fea4a59 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -2309,10 +2309,10 @@ __generic_file_aio_write_nolock(struct kiocb *iocb, const struct iovec *iov, * 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,