On Fri, 30 Nov 2012, Guo Chao wrote: > Date: Fri, 30 Nov 2012 14:41:44 +0800 > From: Guo Chao <yan@xxxxxxxxxxxxxxxxxx> > To: tytso@xxxxxxx > Cc: linux-ext4@xxxxxxxxxxxxxxx > Subject: [PATCH 2/4] ext4: use sync_inode_metadata() when sync inode metadata > > We have a dedicated interface to sync inode metadata. > > Signed-off-by: Guo Chao <yan@xxxxxxxxxxxxxxxxxx> > --- > 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 be1d89f..dfbc1fe 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; > } > Makes sense. Reviewed-by: Lukas Czerner <lczerner@xxxxxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html