Lines Matching defs:ip
215 * @ip: VFS inode
220 * fields in @ip from @vip.
223 vxfs_iinit(struct inode *ip, struct vxfs_inode_info *vip)
226 ip->i_mode = vxfs_transmod(vip);
227 ip->i_uid = (uid_t)vip->vii_uid;
228 ip->i_gid = (gid_t)vip->vii_gid;
230 ip->i_nlink = vip->vii_nlink;
231 ip->i_size = vip->vii_size;
233 ip->i_atime.tv_sec = vip->vii_atime;
234 ip->i_ctime.tv_sec = vip->vii_ctime;
235 ip->i_mtime.tv_sec = vip->vii_mtime;
236 ip->i_atime.tv_nsec = 0;
237 ip->i_ctime.tv_nsec = 0;
238 ip->i_mtime.tv_nsec = 0;
240 ip->i_blocks = vip->vii_blocks;
241 ip->i_generation = vip->vii_gen;
243 ip->i_private = vip;
260 struct inode *ip = NULL;
262 if ((ip = new_inode(sbp))) {
263 vxfs_iinit(ip, vip);
264 ip->i_mapping->a_ops = &vxfs_aops;
266 return (ip);
271 * *ip: VFS inode
274 * vxfs_put_fake_inode frees all data asssociated with @ip.
277 vxfs_put_fake_inode(struct inode *ip)
279 iput(ip);
296 struct inode *ip;
298 ip = iget_locked(sbp, ino);
299 if (!ip)
301 if (!(ip->i_state & I_NEW))
302 return ip;
306 iget_failed(ip);
310 vxfs_iinit(ip, vip);
317 if (S_ISREG(ip->i_mode)) {
318 ip->i_fop = &generic_ro_fops;
319 ip->i_mapping->a_ops = aops;
320 } else if (S_ISDIR(ip->i_mode)) {
321 ip->i_op = &vxfs_dir_inode_ops;
322 ip->i_fop = &vxfs_dir_operations;
323 ip->i_mapping->a_ops = aops;
324 } else if (S_ISLNK(ip->i_mode)) {
326 ip->i_op = &page_symlink_inode_operations;
327 ip->i_mapping->a_ops = &vxfs_aops;
329 ip->i_op = &vxfs_immed_symlink_iops;
330 vip->vii_immed.vi_immed[ip->i_size] = '\0';
333 init_special_inode(ip, ip->i_mode, old_decode_dev(vip->vii_rdev));
335 unlock_new_inode(ip);
336 return ip;
341 * @ip: inode to discard.
348 vxfs_evict_inode(struct inode *ip)
350 truncate_inode_pages(&ip->i_data, 0);
351 end_writeback(ip);
352 kmem_cache_free(vxfs_inode_cachep, ip->i_private);