struct file * file; struct address_space *mapping; int ret, err;  ret = -EBADF; file = fget(fd); if (!file) goto out;  ret = -EINVAL; if (!file->f_op || !file->f_op->fsync) goto out_putf;  mapping = file->f_mapping;  current->flags |= PF_SYNCWRITE; ret = filemap_fdatawrite(mapping); down(&mapping->host->i_sem); err = file->f_op->fsync(file, file->f_dentry, 1); if (!ret) ret = err; up(&mapping->host->i_sem); err = filemap_fdatawait(mapping); if (!ret) ret = err; current->flags &= ~PF_SYNCWRITE;  out_putf: fput(file); out: return ret; 
return do_fsync(fd, 1); 
asmlinkage long sys_fdatasync(unsigned int fd){	struct file * file;	struct address_space *mapping;	int ret, err;	ret = -EBADF;	file = fget(fd);	if (!file)		goto out;	ret = -EINVAL;	if (!file->f_op || !file->f_op->fsync)		goto out_putf;	mapping = file->f_mapping;	current->flags |= PF_SYNCWRITE;	ret = filemap_fdatawrite(mapping);	down(&mapping->host->i_sem);	err = file->f_op->fsync(file, file->f_dentry, 1);	if (!ret)		ret = err;	up(&mapping->host->i_sem);	err = filemap_fdatawait(mapping);	if (!ret)		ret = err;	current->flags &= ~PF_SYNCWRITE;out_putf:	fput(file);out:	return ret;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/dfb388bf8a328f206bba33933dd97230f412238b/buffer.c/clean/fs/buffer.c