• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/fs/fuse/

Lines Matching defs:ff

52 	struct fuse_file *ff;
54 ff = kmalloc(sizeof(struct fuse_file), GFP_KERNEL);
55 if (unlikely(!ff))
58 ff->fc = fc;
59 ff->reserved_req = fuse_request_alloc();
60 if (unlikely(!ff->reserved_req)) {
61 kfree(ff);
65 INIT_LIST_HEAD(&ff->write_entry);
66 atomic_set(&ff->count, 0);
67 RB_CLEAR_NODE(&ff->polled_node);
68 init_waitqueue_head(&ff->poll_wait);
71 ff->kh = ++fc->khctr;
74 return ff;
77 void fuse_file_free(struct fuse_file *ff)
79 fuse_request_free(ff->reserved_req);
80 kfree(ff);
83 struct fuse_file *fuse_file_get(struct fuse_file *ff)
85 atomic_inc(&ff->count);
86 return ff;
94 static void fuse_file_put(struct fuse_file *ff)
96 if (atomic_dec_and_test(&ff->count)) {
97 struct fuse_req *req = ff->reserved_req;
100 fuse_request_send_background(ff->fc, req);
101 kfree(ff);
109 struct fuse_file *ff;
113 ff = fuse_file_alloc(fc);
114 if (!ff)
119 fuse_file_free(ff);
126 ff->fh = outarg.fh;
127 ff->nodeid = nodeid;
128 ff->open_flags = outarg.open_flags;
129 file->private_data = fuse_file_get(ff);
137 struct fuse_file *ff = file->private_data;
140 if (ff->open_flags & FOPEN_DIRECT_IO)
142 if (!(ff->open_flags & FOPEN_KEEP_CACHE))
144 if (ff->open_flags & FOPEN_NONSEEKABLE)
179 static void fuse_prepare_release(struct fuse_file *ff, int flags, int opcode)
181 struct fuse_conn *fc = ff->fc;
182 struct fuse_req *req = ff->reserved_req;
186 list_del(&ff->write_entry);
187 if (!RB_EMPTY_NODE(&ff->polled_node))
188 rb_erase(&ff->polled_node, &fc->polled_files);
191 wake_up_interruptible_sync(&ff->poll_wait);
193 inarg->fh = ff->fh;
196 req->in.h.nodeid = ff->nodeid;
204 struct fuse_file *ff;
207 ff = file->private_data;
208 if (unlikely(!ff))
211 req = ff->reserved_req;
212 fuse_prepare_release(ff, file->f_flags, opcode);
223 fuse_file_put(ff);
239 void fuse_sync_release(struct fuse_file *ff, int flags)
241 WARN_ON(atomic_read(&ff->count) > 1);
242 fuse_prepare_release(ff, flags, FUSE_RELEASE);
243 ff->reserved_req->force = 1;
244 fuse_request_send(ff->fc, ff->reserved_req);
245 fuse_put_request(ff->fc, ff->reserved_req);
246 kfree(ff);
319 struct fuse_file *ff = file->private_data;
332 inarg.fh = ff->fh;
369 struct fuse_file *ff = file->private_data;
396 inarg.fh = ff->fh;
425 struct fuse_file *ff = file->private_data;
427 inarg->fh = ff->fh;
432 req->in.h.nodeid = ff->nodeid;
444 struct fuse_file *ff = file->private_data;
445 struct fuse_conn *fc = ff->fc;
560 if (req->ff)
561 fuse_file_put(req->ff);
566 struct fuse_file *ff = file->private_data;
567 struct fuse_conn *fc = ff->fc;
577 req->ff = fuse_file_get(ff);
668 static void fuse_write_fill(struct fuse_req *req, struct fuse_file *ff,
674 inarg->fh = ff->fh;
678 req->in.h.nodeid = ff->nodeid;
680 if (ff->fc->minor < 9)
694 struct fuse_file *ff = file->private_data;
695 struct fuse_conn *fc = ff->fc;
698 fuse_write_fill(req, ff, pos, count);
1040 struct fuse_file *ff = file->private_data;
1041 struct fuse_conn *fc = ff->fc;
1140 fuse_file_put(req->ff);
1231 struct fuse_file *ff;
1246 ff = list_entry(fi->write_files.next, struct fuse_file, write_entry);
1247 req->ff = fuse_file_get(ff);
1250 fuse_write_fill(req, ff, page_offset(page), 0);
1351 struct fuse_file *ff = file->private_data;
1357 if (list_empty(&ff->write_entry))
1358 list_add(&ff->write_entry, &fi->write_files);
1408 struct fuse_file *ff = file->private_data;
1411 arg->fh = ff->fh;
1732 struct fuse_file *ff = file->private_data;
1733 struct fuse_conn *fc = ff->fc;
1735 .fh = ff->fh,
1812 req->in.h.nodeid = ff->nodeid;
1943 struct fuse_file *ff;
1946 ff = rb_entry(last, struct fuse_file, polled_node);
1948 if (kh < ff->kh)
1950 else if (kh > ff->kh)
1968 struct fuse_file *ff)
1971 if (RB_EMPTY_NODE(&ff->polled_node)) {
1974 link = fuse_find_polled_node(fc, ff->kh, &parent);
1976 rb_link_node(&ff->polled_node, parent, link);
1977 rb_insert_color(&ff->polled_node, &fc->polled_files);
1984 struct fuse_file *ff = file->private_data;
1985 struct fuse_conn *fc = ff->fc;
1986 struct fuse_poll_in inarg = { .fh = ff->fh, .kh = ff->kh };
1994 poll_wait(file, &ff->poll_wait, wait);
2000 if (waitqueue_active(&ff->poll_wait)) {
2002 fuse_register_polled_file(fc, ff);
2010 req->in.h.nodeid = ff->nodeid;
2045 struct fuse_file *ff;
2047 ff = rb_entry(*link, struct fuse_file, polled_node);
2048 wake_up_interruptible_sync(&ff->poll_wait);