Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54617
b: refs/heads/master
c: ef51c97
h: refs/heads/master
i:
  54615: 69a6b24
v: v3
  • Loading branch information
Mark Fasheh authored and Linus Torvalds committed May 8, 2007
1 parent aac0d9b commit de2b9a1
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 524e6752912a891a396a9cf74c5d7d60fff5510a
refs/heads/master: ef51c97623b94f51e439ac91d2736aab3d1b6594
8 changes: 4 additions & 4 deletions trunk/drivers/md/bitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 0 additions & 5 deletions trunk/include/linux/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 *);
Expand Down
8 changes: 4 additions & 4 deletions trunk/mm/filemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit de2b9a1

Please sign in to comment.