Remove do_sync_file_range()
authorMark Fasheh <mark.fasheh@oracle.com>
Tue, 8 May 2007 07:27:10 +0000 (00:27 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 8 May 2007 18:15:04 +0000 (11:15 -0700)
Remove do_sync_file_range() and convert callers to just use
do_sync_mapping_range().

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/md/bitmap.c
fs/sync.c
include/linux/fs.h
mm/filemap.c

index e61e0efe9ec71db54a91916d978ecbda05ec1314..5a4a74c1097c6ce80eb38e726954304dbb25bc53 100644 (file)
@@ -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);
index 5cb9e7e433835d00333ae712612185b0a1f88c35..2f97576355b8828e2b952782860e5af7b3bebea2 100644 (file)
--- 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:
index 527a09a82297887db5512f10b016e2f2f32c7906..7cf0c54a46a7fff64365b3184ea492d572dac9b0 100644 (file)
@@ -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 *);
index 3e49fe13d6ac1f4dbef076f820170a62ef3b6341..9cbf4fea4a5923b94743b3eda4db3b5a0086b974 100644 (file)
@@ -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,