Lines Matching +full:foo +full:- +full:queue
1 /*-
2 * SPDX-License-Identifier: BSD-3-Clause
4 * Copyright (c) 2007-2009 Google Inc. and Amit Singh
72 #include <sys/queue.h>
132 const struct fuse_open_out *foo; in fuse_filehandle_open() local
151 foo = &default_foo; in fuse_filehandle_open()
156 foi->flags = oflags; in fuse_filehandle_open()
161 foo = &default_foo; in fuse_filehandle_open()
172 foo = fdi.answ; in fuse_filehandle_open()
177 fuse_filehandle_init(vp, fufh_type, fufhp, td, cred, foo); in fuse_filehandle_open()
178 fuse_vnode_open(vp, foo->open_flags, td); in fuse_filehandle_open()
209 fri->fh = fufh->fh_id; in fuse_filehandle_close()
210 fri->flags = fufh_type_2_fflags(fufh->fufh_type); in fuse_filehandle_close()
216 fri->lock_owner = td->td_proc->p_pid; in fuse_filehandle_close()
222 counter_u64_add(fuse_fh_count, -1); in fuse_filehandle_close()
248 LIST_FOREACH(fufh, &fvdat->handles, next) { in fuse_filehandle_validrw()
249 if (fufh->fufh_type == fufh_type && in fuse_filehandle_validrw()
250 fufh->uid == cred->cr_uid && in fuse_filehandle_validrw()
251 fufh->gid == cred->cr_rgid && in fuse_filehandle_validrw()
252 (pid == 0 || fufh->pid == pid)) in fuse_filehandle_validrw()
260 LIST_FOREACH(fufh, &fvdat->handles, next) { in fuse_filehandle_validrw()
261 if (fufh->fufh_type == FUFH_RDWR && in fuse_filehandle_validrw()
262 fufh->uid == cred->cr_uid && in fuse_filehandle_validrw()
263 fufh->gid == cred->cr_rgid && in fuse_filehandle_validrw()
264 (pid == 0 || fufh->pid == pid)) in fuse_filehandle_validrw()
280 /* cred can be NULL for in-kernel clients */ in fuse_filehandle_get()
284 LIST_FOREACH(fufh, &fvdat->handles, next) { in fuse_filehandle_get()
285 if (fufh->fufh_type == fufh_type && in fuse_filehandle_get()
286 fufh->uid == cred->cr_uid && in fuse_filehandle_get()
287 fufh->gid == cred->cr_rgid && in fuse_filehandle_get()
288 (pid == 0 || fufh->pid == pid)) in fuse_filehandle_get()
294 LIST_FOREACH(fufh, &fvdat->handles, next) { in fuse_filehandle_get()
295 if (fufh->fufh_type == fufh_type) in fuse_filehandle_get()
319 LIST_FOREACH(fufh, &fvdat->handles, next) { in fuse_filehandle_get_anyflags()
320 if (fufh->uid == cred->cr_uid && in fuse_filehandle_get_anyflags()
321 fufh->gid == cred->cr_rgid && in fuse_filehandle_get_anyflags()
322 (pid == 0 || fufh->pid == pid)) in fuse_filehandle_get_anyflags()
328 fufh = LIST_FIRST(&fvdat->handles); in fuse_filehandle_get_anyflags()
354 const struct fuse_open_out *foo) in fuse_filehandle_init() argument
362 fufh->fh_id = foo->fh; in fuse_filehandle_init()
363 fufh->fufh_type = fufh_type; in fuse_filehandle_init()
364 fufh->gid = cred->cr_rgid; in fuse_filehandle_init()
365 fufh->uid = cred->cr_uid; in fuse_filehandle_init()
366 fufh->pid = td->td_proc->p_pid; in fuse_filehandle_init()
367 fufh->fuse_open_flags = foo->open_flags; in fuse_filehandle_init()
371 LIST_INSERT_HEAD(&fvdat->handles, fufh, next); in fuse_filehandle_init()
377 if (foo->open_flags & FOPEN_DIRECT_IO) { in fuse_filehandle_init()
379 VTOFUD(vp)->flag |= FN_DIRECTIO; in fuse_filehandle_init()
382 if ((foo->open_flags & FOPEN_KEEP_CACHE) == 0) in fuse_filehandle_init()
384 VTOFUD(vp)->flag &= ~FN_DIRECTIO; in fuse_filehandle_init()