/* Sync a file As this calls fsync (not fdatasync) there is no need for a write_inode after it.  */
static int nfsd_dosync(struct file *filp, struct dentry *dp, const struct file_operations *fop)
/* Sync a file As this calls fsync (not fdatasync) there is no need for a write_inode after it.  */
static int nfsd_dosync(struct file *filp, struct dentry *dp, const struct file_operations *fop)
{
	struct inode *inode = dp->d_inode;
	int (*fsync) (struct file *, struct dentry *, int);
	int err;
	err = filemap_write_and_wait(inode->i_mapping);
	if (err == 0 && fop && (fsync = fop->fsync))
		err = fsync(filp, dp, 0);
	return err;
}