struct fuse_conn *fc = get_fuse_conn(inode); struct fuse_req *req; struct fuse_open_in inarg; 
int fuse_open_common(struct inode *inode, struct file *file, int isdir){	struct fuse_conn *fc = get_fuse_conn(inode);	struct fuse_req *req;	struct fuse_open_in inarg;	struct fuse_open_out outarg;	struct fuse_file *ff;	int err;	/* VFS checks this, but only _after_ ->open() */	if (file->f_flags & O_DIRECT)		return -EINVAL;	err = generic_file_open(inode, file);	if (err)		return err;	/* If opening the root node, no lookup has been performed on	   it, so the attributes must be refreshed */	if (get_node_id(inode) == FUSE_ROOT_ID) {		int err = fuse_do_getattr(inode);		if (err)		 	return err;	}	req = fuse_get_request(fc);	if (!req)		return -EINTR;	err = -ENOMEM;	ff = kmalloc(sizeof(struct fuse_file), GFP_KERNEL);	if (!ff)		goto out_put_request;	ff->release_req = fuse_request_alloc();	if (!ff->release_req) {		kfree(ff);		goto out_put_request;	}	memset(&inarg, 0, sizeof(inarg));	inarg.flags = file->f_flags & ~(O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC);	req->in.h.opcode = isdir ? FUSE_OPENDIR : FUSE_OPEN;	req->in.h.nodeid = get_node_id(inode);	req->inode = inode;	req->in.numargs = 1;	req->in.args[0].size = sizeof(inarg);	req->in.args[0].value = &inarg;	req->out.numargs = 1;	req->out.args[0].size = sizeof(outarg);	req->out.args[0].value = &outarg;	request_send(fc, req);	err = req->out.h.error;	if (err) {		fuse_request_free(ff->release_req);		kfree(ff);	} else {		if (!isdir && (outarg.open_flags & FOPEN_DIRECT_IO))			file->f_op = &fuse_direct_io_file_operations;		if (!(outarg.open_flags & FOPEN_KEEP_CACHE))			invalidate_inode_pages(inode->i_mapping);		ff->fh = outarg.fh;		file->private_data = ff;	} out_put_request:	fuse_put_request(fc, req);	return err;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/fd72faac95d7e47610e981d7ed7b3c1529e55c88/file.c/buggy/fs/fuse/file.c