Lines Matching refs:inode

16 adfs_get_block(struct inode *inode, sector_t block, struct buffer_head *bh,  in adfs_get_block()  argument
20 if (block >= inode->i_blocks) in adfs_get_block()
23 block = __adfs_block_map(inode->i_sb, ADFS_I(inode)->indaddr, in adfs_get_block()
26 map_bh(bh, inode->i_sb, block); in adfs_get_block()
48 struct inode *inode = mapping->host; in adfs_write_failed() local
50 if (to > inode->i_size) in adfs_write_failed()
51 truncate_pagecache(inode, inode->i_size); in adfs_write_failed()
89 adfs_atts2mode(struct super_block *sb, struct inode *inode) in adfs_atts2mode() argument
91 unsigned int attr = ADFS_I(inode)->attr; in adfs_atts2mode()
100 switch (adfs_filetype(ADFS_I(inode)->loadaddr)) { in adfs_atts2mode()
132 static int adfs_mode2atts(struct super_block *sb, struct inode *inode, in adfs_mode2atts() argument
140 if (S_ISLNK(inode->i_mode)) in adfs_mode2atts()
141 return ADFS_I(inode)->attr; in adfs_mode2atts()
144 if (S_ISDIR(inode->i_mode)) in adfs_mode2atts()
172 adfs_adfs2unix_time(struct timespec64 *tv, struct inode *inode) in adfs_adfs2unix_time() argument
180 if (!adfs_inode_is_stamped(inode)) in adfs_adfs2unix_time()
183 high = ADFS_I(inode)->loadaddr & 0xFF; /* top 8 bits of timestamp */ in adfs_adfs2unix_time()
184 low = ADFS_I(inode)->execaddr; /* bottom 32 bits of timestamp */ in adfs_adfs2unix_time()
202 *tv = current_time(inode); in adfs_adfs2unix_time()
211 static void adfs_unix2adfs_time(struct inode *inode, in adfs_unix2adfs_time() argument
224 ADFS_I(inode)->loadaddr &= ~0xff; in adfs_unix2adfs_time()
225 ADFS_I(inode)->loadaddr |= (cs >> 32) & 0xff; in adfs_unix2adfs_time()
226 ADFS_I(inode)->execaddr = cs; in adfs_unix2adfs_time()
241 struct inode *
244 struct inode *inode; in adfs_iget() local
246 inode = new_inode(sb); in adfs_iget()
247 if (!inode) in adfs_iget()
250 inode->i_uid = ADFS_SB(sb)->s_uid; in adfs_iget()
251 inode->i_gid = ADFS_SB(sb)->s_gid; in adfs_iget()
252 inode->i_ino = obj->indaddr; in adfs_iget()
253 inode->i_size = obj->size; in adfs_iget()
254 set_nlink(inode, 2); in adfs_iget()
255 inode->i_blocks = (inode->i_size + sb->s_blocksize - 1) >> in adfs_iget()
264 ADFS_I(inode)->parent_id = obj->parent_id; in adfs_iget()
265 ADFS_I(inode)->indaddr = obj->indaddr; in adfs_iget()
266 ADFS_I(inode)->loadaddr = obj->loadaddr; in adfs_iget()
267 ADFS_I(inode)->execaddr = obj->execaddr; in adfs_iget()
268 ADFS_I(inode)->attr = obj->attr; in adfs_iget()
270 inode->i_mode = adfs_atts2mode(sb, inode); in adfs_iget()
271 adfs_adfs2unix_time(&inode->i_mtime, inode); in adfs_iget()
272 inode->i_atime = inode->i_mtime; in adfs_iget()
273 inode_set_ctime_to_ts(inode, inode->i_mtime); in adfs_iget()
275 if (S_ISDIR(inode->i_mode)) { in adfs_iget()
276 inode->i_op = &adfs_dir_inode_operations; in adfs_iget()
277 inode->i_fop = &adfs_dir_operations; in adfs_iget()
278 } else if (S_ISREG(inode->i_mode)) { in adfs_iget()
279 inode->i_op = &adfs_file_inode_operations; in adfs_iget()
280 inode->i_fop = &adfs_file_operations; in adfs_iget()
281 inode->i_mapping->a_ops = &adfs_aops; in adfs_iget()
282 ADFS_I(inode)->mmu_private = inode->i_size; in adfs_iget()
285 inode_fake_hash(inode); in adfs_iget()
288 return inode; in adfs_iget()
300 struct inode *inode = d_inode(dentry); in adfs_notify_change() local
301 struct super_block *sb = inode->i_sb; in adfs_notify_change()
320 truncate_setsize(inode, attr->ia_size); in adfs_notify_change()
322 if (ia_valid & ATTR_MTIME && adfs_inode_is_stamped(inode)) { in adfs_notify_change()
323 adfs_unix2adfs_time(inode, &attr->ia_mtime); in adfs_notify_change()
324 adfs_adfs2unix_time(&inode->i_mtime, inode); in adfs_notify_change()
332 inode->i_atime = attr->ia_atime; in adfs_notify_change()
334 inode_set_ctime_to_ts(inode, attr->ia_ctime); in adfs_notify_change()
336 ADFS_I(inode)->attr = adfs_mode2atts(sb, inode, attr->ia_mode); in adfs_notify_change()
337 inode->i_mode = adfs_atts2mode(sb, inode); in adfs_notify_change()
345 mark_inode_dirty(inode); in adfs_notify_change()
355 int adfs_write_inode(struct inode *inode, struct writeback_control *wbc) in adfs_write_inode() argument
357 struct super_block *sb = inode->i_sb; in adfs_write_inode()
360 obj.indaddr = ADFS_I(inode)->indaddr; in adfs_write_inode()
362 obj.parent_id = ADFS_I(inode)->parent_id; in adfs_write_inode()
363 obj.loadaddr = ADFS_I(inode)->loadaddr; in adfs_write_inode()
364 obj.execaddr = ADFS_I(inode)->execaddr; in adfs_write_inode()
365 obj.attr = ADFS_I(inode)->attr; in adfs_write_inode()
366 obj.size = inode->i_size; in adfs_write_inode()