aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorGuo Chao <yan@linux.vnet.ibm.com>2012-12-10 14:06:03 -0500
committerTheodore Ts'o <tytso@mit.edu>2012-12-10 14:06:03 -0500
commit64744e03c6871e5e4678478bab1b8c3ba6cca395 (patch)
tree8cfade7fe7ef05ebc9e504d4ee709ebcac298e90 /fs/ext4
parentf08225d176a5736363beea653b9b3fb9400c1255 (diff)
ext4: use sync_inode_metadata() when syncing inode metadata
We have a dedicated interface to sync inode metadata. Use it to simplify ext4's code some. Signed-off-by: Guo Chao <yan@linux.vnet.ibm.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reviewed-by: Lukas Czerner <lczerner@redhat.com>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/fsync.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/ext4/fsync.c b/fs/ext4/fsync.c
index be1d89f385b4..dfbc1fe96674 100644
--- a/fs/ext4/fsync.c
+++ b/fs/ext4/fsync.c
@@ -44,7 +44,6 @@
44 */ 44 */
45static int ext4_sync_parent(struct inode *inode) 45static int ext4_sync_parent(struct inode *inode)
46{ 46{
47 struct writeback_control wbc;
48 struct dentry *dentry = NULL; 47 struct dentry *dentry = NULL;
49 struct inode *next; 48 struct inode *next;
50 int ret = 0; 49 int ret = 0;
@@ -66,10 +65,7 @@ static int ext4_sync_parent(struct inode *inode)
66 ret = sync_mapping_buffers(inode->i_mapping); 65 ret = sync_mapping_buffers(inode->i_mapping);
67 if (ret) 66 if (ret)
68 break; 67 break;
69 memset(&wbc, 0, sizeof(wbc)); 68 ret = sync_inode_metadata(inode, 1);
70 wbc.sync_mode = WB_SYNC_ALL;
71 wbc.nr_to_write = 0; /* only write out the inode */
72 ret = sync_inode(inode, &wbc);
73 if (ret) 69 if (ret)
74 break; 70 break;
75 } 71 }