From 64744e03c6871e5e4678478bab1b8c3ba6cca395 Mon Sep 17 00:00:00 2001 From: Guo Chao Date: Mon, 10 Dec 2012 14:06:03 -0500 Subject: 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 Signed-off-by: "Theodore Ts'o" Reviewed-by: Lukas Czerner --- fs/ext4/fsync.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/fs/ext4/fsync.c b/fs/ext4/fsync.c index be1d89f385b..dfbc1fe9667 100644 --- a/fs/ext4/fsync.c +++ b/fs/ext4/fsync.c @@ -44,7 +44,6 @@ */ static int ext4_sync_parent(struct inode *inode) { - struct writeback_control wbc; struct dentry *dentry = NULL; struct inode *next; int ret = 0; @@ -66,10 +65,7 @@ static int ext4_sync_parent(struct inode *inode) ret = sync_mapping_buffers(inode->i_mapping); if (ret) break; - memset(&wbc, 0, sizeof(wbc)); - wbc.sync_mode = WB_SYNC_ALL; - wbc.nr_to_write = 0; /* only write out the inode */ - ret = sync_inode(inode, &wbc); + ret = sync_inode_metadata(inode, 1); if (ret) break; } -- cgit v1.2.3-18-g5258