trace_ext4_sync_file_enter(file, datasync);
if (inode->i_sb->s_flags & MS_RDONLY)
- goto out_trace;
+ goto out;
if (!journal) {
ret = generic_file_fsync(file, start, end, datasync);
if (!ret && !hlist_empty(&inode->i_dentry))
ret = ext4_sync_parent(inode);
- goto out_trace;
+ goto out;
}
ret = filemap_write_and_wait_range(inode->i_mapping, start, end);
if (ret)
return ret;
- mutex_lock(&inode->i_mutex);
-
/*
* data=writeback,ordered:
* The caller's filemap_fdatawrite()/wait will sync the data.
ret = err;
}
out:
- mutex_unlock(&inode->i_mutex);
-out_trace:
trace_ext4_sync_file_exit(inode, ret);
return ret;
}