Deleted Added
full compact
fuse_file.c (242727) fuse_file.c (299753)
1/*
2 * Copyright (c) 2007-2009 Google Inc. and Amit Singh
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met:
8 *

--- 40 unchanged lines hidden (view full) ---

49 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
50 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
51 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
52 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
53 * SUCH DAMAGE.
54 */
55
56#include <sys/cdefs.h>
1/*
2 * Copyright (c) 2007-2009 Google Inc. and Amit Singh
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met:
8 *

--- 40 unchanged lines hidden (view full) ---

49 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
50 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
51 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
52 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
53 * SUCH DAMAGE.
54 */
55
56#include <sys/cdefs.h>
57__FBSDID("$FreeBSD: head/sys/fs/fuse/fuse_file.c 242727 2012-11-08 00:32:49Z attilio $");
57__FBSDID("$FreeBSD: head/sys/fs/fuse/fuse_file.c 299753 2016-05-14 20:03:22Z rmacklem $");
58
59#include <sys/types.h>
60#include <sys/module.h>
61#include <sys/systm.h>
62#include <sys/errno.h>
63#include <sys/param.h>
64#include <sys/kernel.h>
65#include <sys/conf.h>

--- 70 unchanged lines hidden (view full) ---

136 if (err == ENOENT) {
137 fuse_internal_vnode_disappear(vp);
138 }
139 goto out;
140 }
141 foo = fdi.answ;
142
143 fuse_filehandle_init(vp, fufh_type, fufhp, foo->fh);
58
59#include <sys/types.h>
60#include <sys/module.h>
61#include <sys/systm.h>
62#include <sys/errno.h>
63#include <sys/param.h>
64#include <sys/kernel.h>
65#include <sys/conf.h>

--- 70 unchanged lines hidden (view full) ---

136 if (err == ENOENT) {
137 fuse_internal_vnode_disappear(vp);
138 }
139 goto out;
140 }
141 foo = fdi.answ;
142
143 fuse_filehandle_init(vp, fufh_type, fufhp, foo->fh);
144 fuse_vnode_open(vp, foo->open_flags, td);
145
144
145 /*
146 * For WRONLY opens, force DIRECT_IO. This is necessary
147 * since writing a partial block through the buffer cache
148 * will result in a read of the block and that read won't
149 * be allowed by the WRONLY open.
150 */
151 if (fufh_type == FUFH_WRONLY)
152 fuse_vnode_open(vp, foo->open_flags | FOPEN_DIRECT_IO, td);
153 else
154 fuse_vnode_open(vp, foo->open_flags, td);
155
146out:
147 fdisp_destroy(&fdi);
148 return err;
149}
150
151int
152fuse_filehandle_close(struct vnode *vp,
153 fufh_type_t fufh_type,

--- 106 unchanged lines hidden ---
156out:
157 fdisp_destroy(&fdi);
158 return err;
159}
160
161int
162fuse_filehandle_close(struct vnode *vp,
163 fufh_type_t fufh_type,

--- 106 unchanged lines hidden ---