Lines Matching refs:od

238 static void ovl_cache_put(struct ovl_dir_file *od, struct inode *inode)
240 struct ovl_dir_cache *cache = od->cache;
324 struct ovl_dir_file *od = file->private_data;
325 struct ovl_dir_cache *cache = od->cache;
330 ovl_cache_put(od, inode);
331 od->cache = NULL;
332 od->cursor = NULL;
335 if (od->is_real != is_real) {
339 od->is_real = false;
379 static void ovl_seek_cursor(struct ovl_dir_file *od, loff_t pos)
384 list_for_each(p, &od->cache->entries) {
390 od->cursor = p;
680 struct ovl_dir_file *od = file->private_data;
689 return od->is_upper && ovl_test_flag(OVL_IMPURE, dir);
696 struct ovl_dir_file *od = file->private_data;
729 err = iterate_dir(od->realfile, &rdt.ctx);
738 struct ovl_dir_file *od = file->private_data;
749 if (od->is_real) {
761 err = iterate_dir(od->realfile, ctx);
766 if (!od->cache) {
774 od->cache = cache;
775 ovl_seek_cursor(od, ctx->pos);
778 while (od->cursor != &od->cache->entries) {
779 p = list_entry(od->cursor, struct ovl_cache_entry, l_node);
792 od->cursor = p->l_node.next;
804 struct ovl_dir_file *od = file->private_data;
810 if (od->is_real) {
811 res = vfs_llseek(od->realfile, offset, origin);
812 file->f_pos = od->realfile->f_pos;
830 if (od->cache)
831 ovl_seek_cursor(od, offset);
864 struct ovl_dir_file *od = file->private_data;
866 struct file *old, *realfile = od->realfile;
874 if (!od->is_upper) {
875 realfile = READ_ONCE(od->upperfile);
884 old = cmpxchg_release(&od->upperfile, NULL, realfile);
917 struct ovl_dir_file *od = file->private_data;
919 if (od->cache) {
921 ovl_cache_put(od, inode);
924 fput(od->realfile);
925 if (od->upperfile)
926 fput(od->upperfile);
927 kfree(od);
936 struct ovl_dir_file *od;
939 od = kzalloc(sizeof(struct ovl_dir_file), GFP_KERNEL);
940 if (!od)
946 kfree(od);
949 od->realfile = realfile;
950 od->is_real = ovl_dir_is_real(inode);
951 od->is_upper = OVL_TYPE_UPPER(type);
952 file->private_data = od;