Lines Matching refs:inode
33 struct inode *inode = d_inode(path->dentry);
34 generic_fillattr(inode, stat);
35 stat->blocks = inode->i_mapping->nrpages << (PAGE_SHIFT - 9);
68 struct dentry *simple_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags)
79 int dcache_dir_open(struct inode *inode, struct file *file)
87 int dcache_dir_close(struct inode *inode, struct file *file)
176 static inline unsigned char dt_type(struct inode *inode)
178 return (inode->i_mode >> 12) & 15;
273 struct inode *inode = this->d_inode;
275 inode_lock(inode);
277 inode->i_flags |= S_DEAD;
281 inode->i_ctime = current_time(inode);
282 clear_nlink(inode);
283 inode_unlock(inode);
286 inode = this->d_inode;
287 inode_lock(inode);
291 fsnotify_rmdir(inode, victim);
293 fsnotify_unlink(inode, victim);
299 inode->i_ctime = inode->i_mtime =
300 current_time(inode);
302 drop_nlink(inode);
303 inode_unlock(inode);
308 inode_unlock(inode);
321 struct inode *root;
335 * since this is the first inode, make it number 1. New inodes created
385 int simple_open(struct inode *inode, struct file *file)
387 if (inode->i_private)
388 file->private_data = inode->i_private;
393 int simple_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry)
395 struct inode *inode = d_inode(old_dentry);
397 inode->i_ctime = dir->i_ctime = dir->i_mtime = current_time(inode);
398 inc_nlink(inode);
399 ihold(inode);
401 d_instantiate(dentry, inode);
427 int simple_unlink(struct inode *dir, struct dentry *dentry)
429 struct inode *inode = d_inode(dentry);
431 inode->i_ctime = dir->i_ctime = dir->i_mtime = current_time(inode);
432 drop_nlink(inode);
438 int simple_rmdir(struct inode *dir, struct dentry *dentry)
450 int simple_rename(struct inode *old_dir, struct dentry *old_dentry,
451 struct inode *new_dir, struct dentry *new_dentry,
454 struct inode *inode = d_inode(old_dentry);
475 new_dir->i_mtime = inode->i_ctime = current_time(old_dir);
497 struct inode *inode = d_inode(dentry);
505 truncate_setsize(inode, iattr->ia_size);
506 setattr_copy(inode, iattr);
507 mark_inode_dirty(inode);
572 struct inode *inode = page->mapping->host;
588 if (last_pos > inode->i_size)
589 i_size_write(inode, last_pos);
601 * unique inode values later for this filesystem, then you must take care
607 struct inode *inode;
618 inode = new_inode(s);
619 if (!inode)
622 * because the root inode is 1, the files array must not contain an
625 inode->i_ino = 1;
626 inode->i_mode = S_IFDIR | 0755;
627 inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
628 inode->i_op = &simple_dir_inode_operations;
629 inode->i_fop = &simple_dir_operations;
630 set_nlink(inode, 2);
631 root = d_make_root(inode);
638 /* warn if it tries to conflict with the root inode */
647 inode = new_inode(s);
648 if (!inode) {
652 inode->i_mode = S_IFREG | files->mode;
653 inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
654 inode->i_fop = files->ops;
655 inode->i_ino = i;
656 d_add(dentry, inode);
869 int simple_transaction_release(struct inode *inode, struct file *file)
890 int simple_attr_open(struct inode *inode, struct file *file,
902 attr->data = inode->i_private;
908 return nonseekable_open(inode, file);
912 int simple_attr_release(struct inode *inode, struct file *file)
1014 * @get_inode: filesystem callback to retrieve inode
1018 * inode for the object specified in the file handle.
1021 int fh_len, int fh_type, struct inode *(*get_inode)
1024 struct inode *inode = NULL;
1032 inode = get_inode(sb, fid->i32.ino, fid->i32.gen);
1036 return d_obtain_alias(inode);
1046 * @get_inode: filesystem callback to retrieve inode
1050 * inode for the _parent_ object specified in the file handle if it
1054 int fh_len, int fh_type, struct inode *(*get_inode)
1057 struct inode *inode = NULL;
1064 inode = get_inode(sb, fid->i32.parent_ino,
1069 return d_obtain_alias(inode);
1082 * filesystems which track all non-inode metadata in the buffers list
1088 struct inode *inode = file->f_mapping->host;
1096 inode_lock(inode);
1097 ret = sync_mapping_buffers(inode->i_mapping);
1098 if (!(inode->i_state & I_DIRTY_ALL))
1100 if (datasync && !(inode->i_state & I_DIRTY_DATASYNC))
1103 err = sync_inode_metadata(inode, 1);
1108 inode_unlock(inode);
1130 struct inode *inode = file->f_mapping->host;
1136 return blkdev_issue_flush(inode->i_sb->s_bdev, GFP_KERNEL);
1183 * the inode address_space in response to mkwrite faults. In the
1210 * inode->a_ops so that open/fcntl know that direct I/O is
1234 * A single inode exists for all anon_inode files. Contrary to pipes,
1238 struct inode *alloc_anon_inode(struct super_block *s)
1243 struct inode *inode = new_inode_pseudo(s);
1245 if (!inode)
1248 inode->i_ino = get_next_ino();
1249 inode->i_mapping->a_ops = &anon_aops;
1252 * Mark the inode dirty from the very beginning,
1257 inode->i_state = I_DIRTY;
1258 inode->i_mode = S_IRUSR | S_IWUSR;
1259 inode->i_uid = current_fsuid();
1260 inode->i_gid = current_fsgid();
1261 inode->i_flags |= S_PRIVATE;
1262 inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
1263 return inode;
1288 * @inode: the symlink inode
1299 const char *simple_get_link(struct dentry *dentry, struct inode *inode,
1302 return inode->i_link;
1314 static struct dentry *empty_dir_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags)
1322 struct inode *inode = d_inode(path->dentry);
1323 generic_fillattr(inode, stat);
1365 void make_empty_dir_inode(struct inode *inode)
1367 set_nlink(inode, 2);
1368 inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO;
1369 inode->i_uid = GLOBAL_ROOT_UID;
1370 inode->i_gid = GLOBAL_ROOT_GID;
1371 inode->i_rdev = 0;
1372 inode->i_size = 0;
1373 inode->i_blkbits = PAGE_SHIFT;
1374 inode->i_blocks = 0;
1376 inode->i_op = &empty_dir_inode_operations;
1377 inode->i_opflags &= ~IOP_XATTR;
1378 inode->i_fop = &empty_dir_operations;
1381 bool is_empty_dir_inode(struct inode *inode)
1383 return (inode->i_fop == &empty_dir_operations) &&
1384 (inode->i_op == &empty_dir_inode_operations);
1393 static bool needs_casefold(const struct inode *dir)
1411 const struct inode *dir = READ_ONCE(parent->d_inode);
1456 const struct inode *dir = READ_ONCE(dentry->d_inode);