diff options
Diffstat (limited to 'fs/ext4/fsync.c')
-rw-r--r-- | fs/ext4/fsync.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/ext4/fsync.c b/fs/ext4/fsync.c index dd1fd3c0fc05..272faa27761d 100644 --- a/fs/ext4/fsync.c +++ b/fs/ext4/fsync.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/fs/ext3/fsync.c | 2 | * linux/fs/ext4/fsync.c |
3 | * | 3 | * |
4 | * Copyright (C) 1993 Stephen Tweedie (sct@redhat.com) | 4 | * Copyright (C) 1993 Stephen Tweedie (sct@redhat.com) |
5 | * from | 5 | * from |
@@ -9,7 +9,7 @@ | |||
9 | * from | 9 | * from |
10 | * linux/fs/minix/truncate.c Copyright (C) 1991, 1992 Linus Torvalds | 10 | * linux/fs/minix/truncate.c Copyright (C) 1991, 1992 Linus Torvalds |
11 | * | 11 | * |
12 | * ext3fs fsync primitive | 12 | * ext4fs fsync primitive |
13 | * | 13 | * |
14 | * Big-endian to little-endian byte-swapping/bitmaps by | 14 | * Big-endian to little-endian byte-swapping/bitmaps by |
15 | * David S. Miller (davem@caip.rutgers.edu), 1995 | 15 | * David S. Miller (davem@caip.rutgers.edu), 1995 |
@@ -27,11 +27,11 @@ | |||
27 | #include <linux/sched.h> | 27 | #include <linux/sched.h> |
28 | #include <linux/writeback.h> | 28 | #include <linux/writeback.h> |
29 | #include <linux/jbd.h> | 29 | #include <linux/jbd.h> |
30 | #include <linux/ext3_fs.h> | 30 | #include <linux/ext4_fs.h> |
31 | #include <linux/ext3_jbd.h> | 31 | #include <linux/ext4_jbd.h> |
32 | 32 | ||
33 | /* | 33 | /* |
34 | * akpm: A new design for ext3_sync_file(). | 34 | * akpm: A new design for ext4_sync_file(). |
35 | * | 35 | * |
36 | * This is only called from sys_fsync(), sys_fdatasync() and sys_msync(). | 36 | * This is only called from sys_fsync(), sys_fdatasync() and sys_msync(). |
37 | * There cannot be a transaction open by this task. | 37 | * There cannot be a transaction open by this task. |
@@ -42,12 +42,12 @@ | |||
42 | * inode to disk. | 42 | * inode to disk. |
43 | */ | 43 | */ |
44 | 44 | ||
45 | int ext3_sync_file(struct file * file, struct dentry *dentry, int datasync) | 45 | int ext4_sync_file(struct file * file, struct dentry *dentry, int datasync) |
46 | { | 46 | { |
47 | struct inode *inode = dentry->d_inode; | 47 | struct inode *inode = dentry->d_inode; |
48 | int ret = 0; | 48 | int ret = 0; |
49 | 49 | ||
50 | J_ASSERT(ext3_journal_current_handle() == 0); | 50 | J_ASSERT(ext4_journal_current_handle() == 0); |
51 | 51 | ||
52 | /* | 52 | /* |
53 | * data=writeback: | 53 | * data=writeback: |
@@ -61,14 +61,14 @@ int ext3_sync_file(struct file * file, struct dentry *dentry, int datasync) | |||
61 | * | 61 | * |
62 | * data=journal: | 62 | * data=journal: |
63 | * filemap_fdatawrite won't do anything (the buffers are clean). | 63 | * filemap_fdatawrite won't do anything (the buffers are clean). |
64 | * ext3_force_commit will write the file data into the journal and | 64 | * ext4_force_commit will write the file data into the journal and |
65 | * will wait on that. | 65 | * will wait on that. |
66 | * filemap_fdatawait() will encounter a ton of newly-dirtied pages | 66 | * filemap_fdatawait() will encounter a ton of newly-dirtied pages |
67 | * (they were dirtied by commit). But that's OK - the blocks are | 67 | * (they were dirtied by commit). But that's OK - the blocks are |
68 | * safe in-journal, which is all fsync() needs to ensure. | 68 | * safe in-journal, which is all fsync() needs to ensure. |
69 | */ | 69 | */ |
70 | if (ext3_should_journal_data(inode)) { | 70 | if (ext4_should_journal_data(inode)) { |
71 | ret = ext3_force_commit(inode->i_sb); | 71 | ret = ext4_force_commit(inode->i_sb); |
72 | goto out; | 72 | goto out; |
73 | } | 73 | } |
74 | 74 | ||