• Home
  • Raw
  • Download

Lines Matching refs:inode

27 static void coda_fill_inode(struct inode *inode, struct coda_vattr *attr)  in coda_fill_inode()  argument
29 coda_vattr_to_iattr(inode, attr); in coda_fill_inode()
31 if (S_ISREG(inode->i_mode)) { in coda_fill_inode()
32 inode->i_op = &coda_file_inode_operations; in coda_fill_inode()
33 inode->i_fop = &coda_file_operations; in coda_fill_inode()
34 } else if (S_ISDIR(inode->i_mode)) { in coda_fill_inode()
35 inode->i_op = &coda_dir_inode_operations; in coda_fill_inode()
36 inode->i_fop = &coda_dir_operations; in coda_fill_inode()
37 } else if (S_ISLNK(inode->i_mode)) { in coda_fill_inode()
38 inode->i_op = &coda_symlink_inode_operations; 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 return coda_fideq(&(ITOC(inode)->c_fid), fid); in coda_test_inode()
51 static int coda_set_inode(struct inode *inode, void *data) in coda_set_inode() argument
54 ITOC(inode)->c_fid = *fid; in coda_set_inode()
58 struct inode * coda_iget(struct super_block * sb, struct CodaFid * fid, in coda_iget()
61 struct inode *inode; in coda_iget() local
65 inode = iget5_locked(sb, hash, coda_test_inode, coda_set_inode, fid); in coda_iget()
67 if (!inode) in coda_iget()
70 if (inode->i_state & I_NEW) { in coda_iget()
71 cii = ITOC(inode); in coda_iget()
73 inode->i_ino = hash; in coda_iget()
75 unlock_new_inode(inode); in coda_iget()
79 coda_fill_inode(inode, attr); in coda_iget()
80 return inode; in coda_iget()
89 int coda_cnode_make(struct inode **inode, struct CodaFid *fid, struct super_block *sb) in coda_cnode_make() argument
97 *inode = NULL; in coda_cnode_make()
101 *inode = coda_iget(sb, fid, &attr); in coda_cnode_make()
102 if ( IS_ERR(*inode) ) { in coda_cnode_make()
104 return PTR_ERR(*inode); in coda_cnode_make()
110 void coda_replace_fid(struct inode *inode, struct CodaFid *oldfid, in coda_replace_fid() argument
116 cii = ITOC(inode); in coda_replace_fid()
122 remove_inode_hash(inode); in coda_replace_fid()
124 inode->i_ino = hash; in coda_replace_fid()
125 __insert_inode_hash(inode, hash); in coda_replace_fid()
129 struct inode *coda_fid_to_inode(struct CodaFid *fid, struct super_block *sb) in coda_fid_to_inode()
131 struct inode *inode; in coda_fid_to_inode() local
139 inode = ilookup5(sb, hash, coda_test_inode, fid); in coda_fid_to_inode()
140 if ( !inode ) in coda_fid_to_inode()
145 BUG_ON(inode->i_state & I_NEW); in coda_fid_to_inode()
147 return inode; in coda_fid_to_inode()
151 int coda_cnode_makectl(struct inode **inode, struct super_block *sb) in coda_cnode_makectl() argument
155 *inode = new_inode(sb); in coda_cnode_makectl()
156 if (*inode) { in coda_cnode_makectl()
157 (*inode)->i_ino = CTL_INO; in coda_cnode_makectl()
158 (*inode)->i_op = &coda_ioctl_inode_operations; in coda_cnode_makectl()
159 (*inode)->i_fop = &coda_ioctl_operations; in coda_cnode_makectl()
160 (*inode)->i_mode = 0444; in coda_cnode_makectl()