• Home
  • Raw
  • Download

Lines Matching refs:f

23 int jffs2_do_new_inode(struct jffs2_sb_info *c, struct jffs2_inode_info *f,  in jffs2_do_new_inode()  argument
35 f->inocache = ic; in jffs2_do_new_inode()
36 f->inocache->pino_nlink = 1; /* Will be overwritten shortly for directories */ in jffs2_do_new_inode()
37 f->inocache->nodes = (struct jffs2_raw_node_ref *)f->inocache; in jffs2_do_new_inode()
38 f->inocache->state = INO_STATE_PRESENT; in jffs2_do_new_inode()
40 jffs2_add_ino_cache(c, f->inocache); in jffs2_do_new_inode()
41 jffs2_dbg(1, "%s(): Assigned ino# %d\n", __func__, f->inocache->ino); in jffs2_do_new_inode()
42 ri->ino = cpu_to_je32(f->inocache->ino); in jffs2_do_new_inode()
50 f->highest_version = 1; in jffs2_do_new_inode()
51 ri->version = cpu_to_je32(f->highest_version); in jffs2_do_new_inode()
59 struct jffs2_full_dnode *jffs2_write_dnode(struct jffs2_sb_info *c, struct jffs2_inode_info *f, in jffs2_write_dnode() argument
100 if ((alloc_mode!=ALLOC_GC) && (je32_to_cpu(ri->version) < f->highest_version)) { in jffs2_write_dnode()
104 je32_to_cpu(ri->version), f->highest_version); in jffs2_write_dnode()
105 ri->version = cpu_to_je32(++f->highest_version); in jffs2_write_dnode()
110 (alloc_mode==ALLOC_GC)?0:f->inocache->ino); in jffs2_write_dnode()
145 mutex_unlock(&f->sem); in jffs2_write_dnode()
150 mutex_lock(&f->sem); in jffs2_write_dnode()
182 fn->raw = jffs2_add_physical_node_ref(c, flash_ofs, PAD(sizeof(*ri)+datalen), f->inocache); in jffs2_write_dnode()
205 struct jffs2_full_dirent *jffs2_write_dirent(struct jffs2_sb_info *c, struct jffs2_inode_info *f, in jffs2_write_dirent() argument
258 if ((alloc_mode!=ALLOC_GC) && (je32_to_cpu(rd->version) < f->highest_version)) { in jffs2_write_dirent()
262 je32_to_cpu(rd->version), f->highest_version); in jffs2_write_dirent()
263 rd->version = cpu_to_je32(++f->highest_version); in jffs2_write_dirent()
297 mutex_unlock(&f->sem); in jffs2_write_dirent()
302 mutex_lock(&f->sem); in jffs2_write_dirent()
322 PAD(sizeof(*rd)+namelen), f->inocache); in jffs2_write_dirent()
340 int jffs2_write_inode_range(struct jffs2_sb_info *c, struct jffs2_inode_info *f, in jffs2_write_inode_range() argument
348 __func__, f->inocache->ino, offset, writelen); in jffs2_write_inode_range()
368 mutex_lock(&f->sem); in jffs2_write_inode_range()
372 comprtype = jffs2_compress(c, f, buf, &comprbuf, &datalen, &cdatalen); in jffs2_write_inode_range()
379 ri->ino = cpu_to_je32(f->inocache->ino); in jffs2_write_inode_range()
380 ri->version = cpu_to_je32(++f->highest_version); in jffs2_write_inode_range()
390 fn = jffs2_write_dnode(c, f, ri, comprbuf, cdatalen, ALLOC_NORETRY); in jffs2_write_inode_range()
396 mutex_unlock(&f->sem); in jffs2_write_inode_range()
406 ret = jffs2_add_full_dnode_to_inode(c, f, fn); in jffs2_write_inode_range()
407 if (f->metadata) { in jffs2_write_inode_range()
408 jffs2_mark_node_obsolete(c, f->metadata->raw); in jffs2_write_inode_range()
409 jffs2_free_full_dnode(f->metadata); in jffs2_write_inode_range()
410 f->metadata = NULL; in jffs2_write_inode_range()
419 mutex_unlock(&f->sem); in jffs2_write_inode_range()
423 mutex_unlock(&f->sem); in jffs2_write_inode_range()
441 struct jffs2_inode_info *f, struct jffs2_raw_inode *ri, in jffs2_do_create() argument
459 mutex_lock(&f->sem); in jffs2_do_create()
464 fn = jffs2_write_dnode(c, f, ri, NULL, 0, ALLOC_NORMAL); in jffs2_do_create()
472 mutex_unlock(&f->sem); in jffs2_do_create()
479 f->metadata = fn; in jffs2_do_create()
481 mutex_unlock(&f->sem); in jffs2_do_create()
484 ret = jffs2_init_security(&f->vfs_inode, &dir_f->vfs_inode, qstr); in jffs2_do_create()
487 ret = jffs2_init_acl_post(&f->vfs_inode); in jffs2_do_create()