View | Details | Raw Unified | Return to bug 194293 | Differences between
and this patch

Collapse All | Expand All

(-)fs/fuse/fuse_file.h (+3 lines)
Lines 101-106 fuse_filehandle_xlate_from_fflags(int ff Link Here
101
    if ((fflags & FREAD) && (fflags & FWRITE)) {
101
    if ((fflags & FREAD) && (fflags & FWRITE)) {
102
        return FUFH_RDWR;
102
        return FUFH_RDWR;
103
    } else if (fflags & (FWRITE)) {
103
    } else if (fflags & (FWRITE)) {
104
	/* See comment in fuse_vnop_open() w.r.t. why FUFH_RDWR is needed. */
105
        if (datacache != 0)
106
            return FUFH_RDWR;
104
        return FUFH_WRONLY;
107
        return FUFH_WRONLY;
105
    } else if (fflags & (FREAD)) {
108
    } else if (fflags & (FREAD)) {
106
        return FUFH_RDONLY;
109
        return FUFH_RDONLY;
(-)fs/fuse/fuse_vnops.c (-2 / +4 lines)
Lines 276-282 fuse_vnop_close(struct vop_close_args *a Link Here
276
	if (fflag & IO_NDELAY) {
276
	if (fflag & IO_NDELAY) {
277
		return 0;
277
		return 0;
278
	}
278
	}
279
	fufh_type = fuse_filehandle_xlate_from_fflags(fflag);
279
	fufh_type = fuse_filehandle_xlate_from_fflags(fflag,
280
	    fsess_opt_datacache(vnode_mount(vp)));
280
281
281
	if (!fuse_filehandle_valid(vp, fufh_type)) {
282
	if (!fuse_filehandle_valid(vp, fufh_type)) {
282
		int i;
283
		int i;
Lines 1139-1145 fuse_vnop_open(struct vop_open_args *ap) Link Here
1139
	if (isdir) {
1140
	if (isdir) {
1140
		fufh_type = FUFH_RDONLY;
1141
		fufh_type = FUFH_RDONLY;
1141
	} else {
1142
	} else {
1142
		fufh_type = fuse_filehandle_xlate_from_fflags(mode);
1143
		fufh_type = fuse_filehandle_xlate_from_fflags(mode,
1144
		    fsess_opt_datacache(vnode_mount(vp)));
1143
	}
1145
	}
1144
1146
1145
	if (fuse_filehandle_valid(vp, fufh_type)) {
1147
	if (fuse_filehandle_valid(vp, fufh_type)) {

Return to bug 194293