Skip to content

Commit

Permalink
ext4: use sync_inode_metadata() when syncing inode metadata
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Guo Chao authored and Theodore Ts'o committed Dec 10, 2012
1 parent f08225d commit 64744e0
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions fs/ext4/fsync.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down

0 comments on commit 64744e0

Please sign in to comment.