aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext2/inode.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2010-03-05 15:46:18 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2010-03-05 15:46:18 -0500
commit3fa04ecd72780da31ba8b329e148179bc24a9c7d (patch)
treef5d462fd4aee086952d18f159f737c450ab46b3b /fs/ext2/inode.c
parent180b62a3d837613fcac3ce89576526423926c3c3 (diff)
parent1cda707d52e51a6cafac0aef12d2bd7052d572e6 (diff)
Merge branch 'writeback-for-2.6.34' into nfs-for-2.6.34
Diffstat (limited to 'fs/ext2/inode.c')
-rw-r--r--fs/ext2/inode.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c
index 71b032c65a02..36ae1cac767c 100644
--- a/fs/ext2/inode.c
+++ b/fs/ext2/inode.c
@@ -41,6 +41,8 @@ MODULE_AUTHOR("Remy Card and others");
41MODULE_DESCRIPTION("Second Extended Filesystem"); 41MODULE_DESCRIPTION("Second Extended Filesystem");
42MODULE_LICENSE("GPL"); 42MODULE_LICENSE("GPL");
43 43
44static int __ext2_write_inode(struct inode *inode, int do_sync);
45
44/* 46/*
45 * Test whether an inode is a fast symlink. 47 * Test whether an inode is a fast symlink.
46 */ 48 */
@@ -64,7 +66,7 @@ void ext2_delete_inode (struct inode * inode)
64 goto no_delete; 66 goto no_delete;
65 EXT2_I(inode)->i_dtime = get_seconds(); 67 EXT2_I(inode)->i_dtime = get_seconds();
66 mark_inode_dirty(inode); 68 mark_inode_dirty(inode);
67 ext2_write_inode(inode, inode_needs_sync(inode)); 69 __ext2_write_inode(inode, inode_needs_sync(inode));
68 70
69 inode->i_size = 0; 71 inode->i_size = 0;
70 if (inode->i_blocks) 72 if (inode->i_blocks)
@@ -1335,7 +1337,7 @@ bad_inode:
1335 return ERR_PTR(ret); 1337 return ERR_PTR(ret);
1336} 1338}
1337 1339
1338int ext2_write_inode(struct inode *inode, int do_sync) 1340static int __ext2_write_inode(struct inode *inode, int do_sync)
1339{ 1341{
1340 struct ext2_inode_info *ei = EXT2_I(inode); 1342 struct ext2_inode_info *ei = EXT2_I(inode);
1341 struct super_block *sb = inode->i_sb; 1343 struct super_block *sb = inode->i_sb;
@@ -1440,6 +1442,11 @@ int ext2_write_inode(struct inode *inode, int do_sync)
1440 return err; 1442 return err;
1441} 1443}
1442 1444
1445int ext2_write_inode(struct inode *inode, struct writeback_control *wbc)
1446{
1447 return __ext2_write_inode(inode, wbc->sync_mode == WB_SYNC_ALL);
1448}
1449
1443int ext2_sync_inode(struct inode *inode) 1450int ext2_sync_inode(struct inode *inode)
1444{ 1451{
1445 struct writeback_control wbc = { 1452 struct writeback_control wbc = {