Lines Matching defs:ff
58 struct fio_filelock *ff;
61 ff = flist_entry(entry, struct fio_filelock, list);
62 if (ff->hash == hash)
63 return ff;
71 struct fio_filelock *ff;
73 ff = fio_hash_find(hash);
74 if (!ff) {
75 ff = smalloc(sizeof(*ff));
76 ff->hash = hash;
77 __fio_mutex_init(&ff->lock, FIO_MUTEX_UNLOCKED);
78 ff->references = 0;
79 flist_add(&ff->list, filelock_list);
82 return ff;
87 struct fio_filelock *ff;
93 ff = fio_hash_get(hash);
94 ff->references++;
97 if (!fio_mutex_down_trylock(&ff->lock))
106 if (ff->references != 1) {
107 ff->references--;
108 ff = NULL;
113 if (ff) {
114 fio_mutex_down(&ff->lock);
123 struct fio_filelock *ff;
129 ff = fio_hash_get(hash);
130 ff->references++;
133 fio_mutex_down(&ff->lock);
138 struct fio_filelock *ff;
145 ff = fio_hash_find(hash);
146 if (ff) {
147 ff->references--;
148 fio_mutex_up(&ff->lock);
149 if (!ff->references) {
150 flist_del(&ff->list);
151 sfree(ff);