diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-07-04 04:24:09 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-08-09 16:47:43 -0400 |
commit | b5fc510c48f631882ccec3c0f02a25d5b67de09f (patch) | |
tree | 1749954353b972502f05cdfae75b9d5e77cc1f5a /fs/sync.c | |
parent | fa9b227e9019ebaeeb06224ba531a490f91144b3 (diff) |
get rid of file_fsync()
Copy and simplify in the only two users remaining.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/sync.c')
-rw-r--r-- | fs/sync.c | 25 |
1 files changed, 0 insertions, 25 deletions
@@ -128,31 +128,6 @@ void emergency_sync(void) | |||
128 | } | 128 | } |
129 | } | 129 | } |
130 | 130 | ||
131 | /* | ||
132 | * Generic function to fsync a file. | ||
133 | */ | ||
134 | int file_fsync(struct file *filp, int datasync) | ||
135 | { | ||
136 | struct inode *inode = filp->f_mapping->host; | ||
137 | struct super_block * sb; | ||
138 | int ret, err; | ||
139 | |||
140 | /* sync the inode to buffers */ | ||
141 | ret = write_inode_now(inode, 0); | ||
142 | |||
143 | /* sync the superblock to buffers */ | ||
144 | sb = inode->i_sb; | ||
145 | if (sb->s_dirt && sb->s_op->write_super) | ||
146 | sb->s_op->write_super(sb); | ||
147 | |||
148 | /* .. finally sync the buffers to disk */ | ||
149 | err = sync_blockdev(sb->s_bdev); | ||
150 | if (!ret) | ||
151 | ret = err; | ||
152 | return ret; | ||
153 | } | ||
154 | EXPORT_SYMBOL(file_fsync); | ||
155 | |||
156 | /** | 131 | /** |
157 | * vfs_fsync_range - helper to sync a range of data & metadata to disk | 132 | * vfs_fsync_range - helper to sync a range of data & metadata to disk |
158 | * @file: file to sync | 133 | * @file: file to sync |