diff options
author | Jan Kara <jack@suse.cz> | 2010-08-05 14:32:46 -0400 |
---|---|---|
committer | Joel Becker <joel.becker@oracle.com> | 2010-09-10 11:39:44 -0400 |
commit | 4c38881f87c21ada5609a4065cb10e3e74da0d6e (patch) | |
tree | cc311dbffe1e6435e3a25151d32a82b5c9150684 | |
parent | 83fd9c7f65634ac440a6b9b7a63ba562f213ac60 (diff) |
ocfs2: Remove ocfs2_sync_inode()
ocfs2_sync_inode() is used only from ocfs2_sync_file(). But all data has
already been written before calling ocfs2_sync_file() and ocfs2 doesn't use
inode's private_list for tracking metadata buffers thus sync_mapping_buffers()
is superfluous as well.
Signed-off-by: Jan Kara <jack@suse.cz>
Acked-by: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
-rw-r--r-- | fs/ocfs2/file.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 4f9133f6368e..b03f6601fd71 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c | |||
@@ -64,12 +64,6 @@ | |||
64 | 64 | ||
65 | #include "buffer_head_io.h" | 65 | #include "buffer_head_io.h" |
66 | 66 | ||
67 | static int ocfs2_sync_inode(struct inode *inode) | ||
68 | { | ||
69 | filemap_fdatawrite(inode->i_mapping); | ||
70 | return sync_mapping_buffers(inode->i_mapping); | ||
71 | } | ||
72 | |||
73 | static int ocfs2_init_file_private(struct inode *inode, struct file *file) | 67 | static int ocfs2_init_file_private(struct inode *inode, struct file *file) |
74 | { | 68 | { |
75 | struct ocfs2_file_private *fp; | 69 | struct ocfs2_file_private *fp; |
@@ -187,10 +181,6 @@ static int ocfs2_sync_file(struct file *file, int datasync) | |||
187 | mlog_entry("(0x%p, 0x%p, %d, '%.*s')\n", file, dentry, datasync, | 181 | mlog_entry("(0x%p, 0x%p, %d, '%.*s')\n", file, dentry, datasync, |
188 | dentry->d_name.len, dentry->d_name.name); | 182 | dentry->d_name.len, dentry->d_name.name); |
189 | 183 | ||
190 | err = ocfs2_sync_inode(dentry->d_inode); | ||
191 | if (err) | ||
192 | goto bail; | ||
193 | |||
194 | if (datasync && !(inode->i_state & I_DIRTY_DATASYNC)) { | 184 | if (datasync && !(inode->i_state & I_DIRTY_DATASYNC)) { |
195 | /* | 185 | /* |
196 | * We still have to flush drive's caches to get data to the | 186 | * We still have to flush drive's caches to get data to the |