aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2009-08-18 12:43:15 -0400
committerJan Kara <jack@suse.cz>2009-09-14 11:08:17 -0400
commit18f2ee705d98034b0f229a3202d827468d4bffd9 (patch)
tree1da282e5eb90dc8e8a1e46214e0e7639138d3568 /fs
parent2f3d675bcd4a84251d6e8eea8096ec8fc795e5d6 (diff)
vfs: Remove generic_osync_inode() and sync_page_range{_nolock}()
Remove these three functions since nobody uses them anymore. Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs')
-rw-r--r--fs/fs-writeback.c54
1 files changed, 0 insertions, 54 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index da86ef58e427..628235cf44b5 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -1242,57 +1242,3 @@ int sync_inode(struct inode *inode, struct writeback_control *wbc)
1242 return ret; 1242 return ret;
1243} 1243}
1244EXPORT_SYMBOL(sync_inode); 1244EXPORT_SYMBOL(sync_inode);
1245
1246/**
1247 * generic_osync_inode - flush all dirty data for a given inode to disk
1248 * @inode: inode to write
1249 * @mapping: the address_space that should be flushed
1250 * @what: what to write and wait upon
1251 *
1252 * This can be called by file_write functions for files which have the
1253 * O_SYNC flag set, to flush dirty writes to disk.
1254 *
1255 * @what is a bitmask, specifying which part of the inode's data should be
1256 * written and waited upon.
1257 *
1258 * OSYNC_DATA: i_mapping's dirty data
1259 * OSYNC_METADATA: the buffers at i_mapping->private_list
1260 * OSYNC_INODE: the inode itself
1261 */
1262
1263int generic_osync_inode(struct inode *inode, struct address_space *mapping, int what)
1264{
1265 int err = 0;
1266 int need_write_inode_now = 0;
1267 int err2;
1268
1269 if (what & OSYNC_DATA)
1270 err = filemap_fdatawrite(mapping);
1271 if (what & (OSYNC_METADATA|OSYNC_DATA)) {
1272 err2 = sync_mapping_buffers(mapping);
1273 if (!err)
1274 err = err2;
1275 }
1276 if (what & OSYNC_DATA) {
1277 err2 = filemap_fdatawait(mapping);
1278 if (!err)
1279 err = err2;
1280 }
1281
1282 spin_lock(&inode_lock);
1283 if ((inode->i_state & I_DIRTY) &&
1284 ((what & OSYNC_INODE) || (inode->i_state & I_DIRTY_DATASYNC)))
1285 need_write_inode_now = 1;
1286 spin_unlock(&inode_lock);
1287
1288 if (need_write_inode_now) {
1289 err2 = write_inode_now(inode, 1);
1290 if (!err)
1291 err = err2;
1292 }
1293 else
1294 inode_sync_wait(inode);
1295
1296 return err;
1297}
1298EXPORT_SYMBOL(generic_osync_inode);