On Wed, Jun 29, 2011 at 02:05:16PM -0400, Josef Bacik wrote: > diff --git a/fs/ext4/fsync.c b/fs/ext4/fsync.c > index ce66d2f..da3bed3 100644 > --- a/fs/ext4/fsync.c > +++ b/fs/ext4/fsync.c > @@ -151,6 +151,32 @@ static int ext4_sync_parent(struct inode *inode) > return ret; > } > > +/** > + * __sync_file - generic_file_fsync without the locking and filemap_write > + * @inode: inode to sync > + * @datasync: only sync essential metadata if true > + * > + * This is just generic_file_fsync without the locking. This is needed for > + * nojournal mode to make sure this inodes data/metadata makes it to disk > + * properly. The i_mutex should be held already. > + */ > +static int __sync_inode(struct inode *inode, int datasync) The comment calls this __sync_file, instead of __sync_inode. Maybe it would be better to define a generic_file_fsync_nolock() in fs/libfs.c and then have generic_file_fsync() call the _nolock() function? That way we don't have the code duplicated in two different places, and eventually risking it going out of sync with each other. - Ted -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html