• Home
  • Raw
  • Download

Lines Matching refs:inode

26 static void coda_fill_inode(struct inode *inode, struct coda_vattr *attr)  in coda_fill_inode()  argument
28 coda_vattr_to_iattr(inode, attr); in coda_fill_inode()
30 if (S_ISREG(inode->i_mode)) { in coda_fill_inode()
31 inode->i_op = &coda_file_inode_operations; in coda_fill_inode()
32 inode->i_fop = &coda_file_operations; in coda_fill_inode()
33 } else if (S_ISDIR(inode->i_mode)) { in coda_fill_inode()
34 inode->i_op = &coda_dir_inode_operations; in coda_fill_inode()
35 inode->i_fop = &coda_dir_operations; in coda_fill_inode()
36 } else if (S_ISLNK(inode->i_mode)) { in coda_fill_inode()
37 inode->i_op = &coda_symlink_inode_operations; in coda_fill_inode()
38 inode_nohighmem(inode); in coda_fill_inode()
39 inode->i_data.a_ops = &coda_symlink_aops; in coda_fill_inode()
40 inode->i_mapping = &inode->i_data; in coda_fill_inode()
42 init_special_inode(inode, inode->i_mode, huge_decode_dev(attr->va_rdev)); in coda_fill_inode()
45 static int coda_test_inode(struct inode *inode, void *data) in coda_test_inode() argument
48 struct coda_inode_info *cii = ITOC(inode); in coda_test_inode()
52 static int coda_set_inode(struct inode *inode, void *data) in coda_set_inode() argument
55 struct coda_inode_info *cii = ITOC(inode); in coda_set_inode()
60 struct inode * coda_iget(struct super_block * sb, struct CodaFid * fid, in coda_iget()
63 struct inode *inode; in coda_iget() local
67 inode = iget5_locked(sb, hash, coda_test_inode, coda_set_inode, fid); in coda_iget()
69 if (!inode) in coda_iget()
72 if (inode->i_state & I_NEW) { in coda_iget()
73 cii = ITOC(inode); in coda_iget()
75 inode->i_ino = hash; in coda_iget()
78 unlock_new_inode(inode); in coda_iget()
82 coda_fill_inode(inode, attr); in coda_iget()
83 return inode; in coda_iget()
92 struct inode *coda_cnode_make(struct CodaFid *fid, struct super_block *sb) in coda_cnode_make()
95 struct inode *inode; in coda_cnode_make() local
103 inode = coda_iget(sb, fid, &attr); in coda_cnode_make()
104 if (IS_ERR(inode)) in coda_cnode_make()
106 return inode; in coda_cnode_make()
118 void coda_replace_fid(struct inode *inode, struct CodaFid *oldfid, in coda_replace_fid() argument
121 struct coda_inode_info *cii = ITOC(inode); in coda_replace_fid()
128 remove_inode_hash(inode); in coda_replace_fid()
130 inode->i_ino = hash; in coda_replace_fid()
131 __insert_inode_hash(inode, hash); in coda_replace_fid()
135 struct inode *coda_fid_to_inode(struct CodaFid *fid, struct super_block *sb) in coda_fid_to_inode()
137 struct inode *inode; in coda_fid_to_inode() local
140 inode = ilookup5(sb, hash, coda_test_inode, fid); in coda_fid_to_inode()
141 if ( !inode ) in coda_fid_to_inode()
146 BUG_ON(inode->i_state & I_NEW); in coda_fid_to_inode()
148 return inode; in coda_fid_to_inode()
162 struct inode *coda_cnode_makectl(struct super_block *sb) in coda_cnode_makectl()
164 struct inode *inode = new_inode(sb); in coda_cnode_makectl() local
165 if (inode) { in coda_cnode_makectl()
166 inode->i_ino = CTL_INO; in coda_cnode_makectl()
167 inode->i_op = &coda_ioctl_inode_operations; in coda_cnode_makectl()
168 inode->i_fop = &coda_ioctl_operations; in coda_cnode_makectl()
169 inode->i_mode = 0444; in coda_cnode_makectl()
170 return inode; in coda_cnode_makectl()