/fs/ |
D | inode.c | 118 static int no_open(struct inode *inode, struct file *file) in no_open() argument 131 int inode_init_always(struct super_block *sb, struct inode *inode) in inode_init_always() argument 135 struct address_space *const mapping = &inode->i_data; in inode_init_always() 137 inode->i_sb = sb; in inode_init_always() 138 inode->i_blkbits = sb->s_blocksize_bits; in inode_init_always() 139 inode->i_flags = 0; in inode_init_always() 140 atomic_set(&inode->i_count, 1); in inode_init_always() 141 inode->i_op = &empty_iops; in inode_init_always() 142 inode->i_fop = &no_open_fops; in inode_init_always() 143 inode->__i_nlink = 1; in inode_init_always() [all …]
|
D | fs-writeback.c | 71 static inline struct inode *wb_inode(struct list_head *head) in wb_inode() 73 return list_entry(head, struct inode, i_io_list); in wb_inode() 119 static bool inode_io_list_move_locked(struct inode *inode, in inode_io_list_move_locked() argument 125 list_move(&inode->i_io_list, head); in inode_io_list_move_locked() 143 static void inode_io_list_del_locked(struct inode *inode, in inode_io_list_del_locked() argument 148 list_del_init(&inode->i_io_list); in inode_io_list_del_locked() 249 void __inode_attach_wb(struct inode *inode, struct page *page) in __inode_attach_wb() argument 251 struct backing_dev_info *bdi = inode_to_bdi(inode); in __inode_attach_wb() 254 if (inode_cgwb_enabled(inode)) { in __inode_attach_wb() 275 if (unlikely(cmpxchg(&inode->i_wb, NULL, wb))) in __inode_attach_wb() [all …]
|
/fs/f2fs/ |
D | inode.c | 21 void f2fs_mark_inode_dirty_sync(struct inode *inode, bool sync) in f2fs_mark_inode_dirty_sync() argument 23 if (is_inode_flag_set(inode, FI_NEW_INODE)) in f2fs_mark_inode_dirty_sync() 26 if (f2fs_inode_dirtied(inode, sync)) in f2fs_mark_inode_dirty_sync() 29 mark_inode_dirty_sync(inode); in f2fs_mark_inode_dirty_sync() 32 void f2fs_set_inode_flags(struct inode *inode) in f2fs_set_inode_flags() argument 34 unsigned int flags = F2FS_I(inode)->i_flags; in f2fs_set_inode_flags() 47 if (file_is_encrypt(inode)) in f2fs_set_inode_flags() 49 if (file_is_verity(inode)) in f2fs_set_inode_flags() 53 inode_set_flags(inode, new_fl, in f2fs_set_inode_flags() 58 static void __get_inode_rdev(struct inode *inode, struct f2fs_inode *ri) in __get_inode_rdev() argument [all …]
|
D | file.c | 36 struct inode *inode = file_inode(vmf->vma->vm_file); in f2fs_filemap_fault() local 39 down_read(&F2FS_I(inode)->i_mmap_sem); in f2fs_filemap_fault() 41 up_read(&F2FS_I(inode)->i_mmap_sem); in f2fs_filemap_fault() 43 trace_f2fs_filemap_fault(inode, vmf->pgoff, (unsigned long)ret); in f2fs_filemap_fault() 51 struct inode *inode = file_inode(vmf->vma->vm_file); in f2fs_vm_page_mkwrite() local 52 struct f2fs_sb_info *sbi = F2FS_I_SB(inode); in f2fs_vm_page_mkwrite() 66 sb_start_pagefault(inode->i_sb); in f2fs_vm_page_mkwrite() 68 f2fs_bug_on(sbi, f2fs_has_inline_data(inode)); in f2fs_vm_page_mkwrite() 71 down_read(&F2FS_I(inode)->i_mmap_sem); in f2fs_vm_page_mkwrite() 73 if (unlikely(page->mapping != inode->i_mapping || in f2fs_vm_page_mkwrite() [all …]
|
/fs/affs/ |
D | inode.c | 18 struct inode *affs_iget(struct super_block *sb, unsigned long ino) in affs_iget() 23 struct inode *inode; in affs_iget() local 29 inode = iget_locked(sb, ino); in affs_iget() 30 if (!inode) in affs_iget() 32 if (!(inode->i_state & I_NEW)) in affs_iget() 33 return inode; in affs_iget() 35 pr_debug("affs_iget(%lu)\n", inode->i_ino); in affs_iget() 37 block = inode->i_ino; in affs_iget() 53 inode->i_size = 0; in affs_iget() 54 set_nlink(inode, 1); in affs_iget() [all …]
|
D | file.c | 19 static struct buffer_head *affs_get_extblock_slow(struct inode *inode, u32 ext); 22 affs_file_open(struct inode *inode, struct file *filp) in affs_file_open() argument 25 inode->i_ino, atomic_read(&AFFS_I(inode)->i_opencnt)); in affs_file_open() 26 atomic_inc(&AFFS_I(inode)->i_opencnt); in affs_file_open() 31 affs_file_release(struct inode *inode, struct file *filp) in affs_file_release() argument 34 inode->i_ino, atomic_read(&AFFS_I(inode)->i_opencnt)); in affs_file_release() 36 if (atomic_dec_and_test(&AFFS_I(inode)->i_opencnt)) { in affs_file_release() 37 inode_lock(inode); in affs_file_release() 38 if (inode->i_size != AFFS_I(inode)->mmu_private) in affs_file_release() 39 affs_truncate(inode); in affs_file_release() [all …]
|
/fs/hfs/ |
D | inode.c | 43 struct inode *inode = mapping->host; in hfs_write_failed() local 45 if (to > inode->i_size) { in hfs_write_failed() 46 truncate_pagecache(inode, inode->i_size); in hfs_write_failed() 47 hfs_file_truncate(inode); in hfs_write_failed() 74 struct inode *inode = page->mapping->host; in hfs_releasepage() local 75 struct super_block *sb = inode->i_sb; in hfs_releasepage() 81 switch (inode->i_ino) { in hfs_releasepage() 133 struct inode *inode = mapping->host; in hfs_direct_IO() local 137 ret = blockdev_direct_IO(iocb, inode, iter, hfs_get_block); in hfs_direct_IO() 144 loff_t isize = i_size_read(inode); in hfs_direct_IO() [all …]
|
/fs/nfs/ |
D | inode.c | 65 static void nfs_invalidate_inode(struct inode *); 66 static int nfs_update_inode(struct inode *, struct nfs_fattr *); 113 int nfs_drop_inode(struct inode *inode) in nfs_drop_inode() argument 115 return NFS_STALE(inode) || generic_drop_inode(inode); in nfs_drop_inode() 119 void nfs_clear_inode(struct inode *inode) in nfs_clear_inode() argument 124 WARN_ON_ONCE(nfs_have_writebacks(inode)); in nfs_clear_inode() 125 WARN_ON_ONCE(!list_empty(&NFS_I(inode)->open_files)); in nfs_clear_inode() 126 nfs_zap_acl_cache(inode); in nfs_clear_inode() 127 nfs_access_zap_cache(inode); in nfs_clear_inode() 128 nfs_fscache_clear_inode(inode); in nfs_clear_inode() [all …]
|
/fs/reiserfs/ |
D | inode.c | 27 void reiserfs_evict_inode(struct inode *inode) in reiserfs_evict_inode() argument 35 2 * REISERFS_QUOTA_INIT_BLOCKS(inode->i_sb); in reiserfs_evict_inode() 39 if (!inode->i_nlink && !is_bad_inode(inode)) in reiserfs_evict_inode() 40 dquot_initialize(inode); in reiserfs_evict_inode() 42 truncate_inode_pages_final(&inode->i_data); in reiserfs_evict_inode() 43 if (inode->i_nlink) in reiserfs_evict_inode() 51 if (!(inode->i_state & I_NEW) && INODE_PKEY(inode)->k_objectid != 0) { in reiserfs_evict_inode() 53 reiserfs_delete_xattrs(inode); in reiserfs_evict_inode() 55 reiserfs_write_lock(inode->i_sb); in reiserfs_evict_inode() 57 if (journal_begin(&th, inode->i_sb, jbegin_count)) in reiserfs_evict_inode() [all …]
|
/fs/nilfs2/ |
D | inode.c | 39 static int nilfs_iget_test(struct inode *inode, void *opaque); 41 void nilfs_inode_add_blocks(struct inode *inode, int n) in nilfs_inode_add_blocks() argument 43 struct nilfs_root *root = NILFS_I(inode)->i_root; in nilfs_inode_add_blocks() 45 inode_add_bytes(inode, i_blocksize(inode) * n); in nilfs_inode_add_blocks() 50 void nilfs_inode_sub_blocks(struct inode *inode, int n) in nilfs_inode_sub_blocks() argument 52 struct nilfs_root *root = NILFS_I(inode)->i_root; in nilfs_inode_sub_blocks() 54 inode_sub_bytes(inode, i_blocksize(inode) * n); in nilfs_inode_sub_blocks() 70 int nilfs_get_block(struct inode *inode, sector_t blkoff, in nilfs_get_block() argument 73 struct nilfs_inode_info *ii = NILFS_I(inode); in nilfs_get_block() 74 struct the_nilfs *nilfs = inode->i_sb->s_fs_info; in nilfs_get_block() [all …]
|
D | alloc.c | 26 nilfs_palloc_groups_per_desc_block(const struct inode *inode) in nilfs_palloc_groups_per_desc_block() argument 28 return i_blocksize(inode) / in nilfs_palloc_groups_per_desc_block() 37 nilfs_palloc_groups_count(const struct inode *inode) in nilfs_palloc_groups_count() argument 39 return 1UL << (BITS_PER_LONG - (inode->i_blkbits + 3 /* log2(8) */)); in nilfs_palloc_groups_count() 47 int nilfs_palloc_init_blockgroup(struct inode *inode, unsigned int entry_size) in nilfs_palloc_init_blockgroup() argument 49 struct nilfs_mdt_info *mi = NILFS_MDT(inode); in nilfs_palloc_init_blockgroup() 57 nilfs_mdt_set_entry_size(inode, entry_size, 0); in nilfs_palloc_init_blockgroup() 60 DIV_ROUND_UP(nilfs_palloc_entries_per_group(inode), in nilfs_palloc_init_blockgroup() 67 nilfs_palloc_groups_per_desc_block(inode) * in nilfs_palloc_init_blockgroup() 82 static unsigned long nilfs_palloc_group(const struct inode *inode, __u64 nr, in nilfs_palloc_group() argument [all …]
|
D | namei.c | 35 static inline int nilfs_add_nondir(struct dentry *dentry, struct inode *inode) in nilfs_add_nondir() argument 37 int err = nilfs_add_link(dentry, inode); in nilfs_add_nondir() 40 d_instantiate_new(dentry, inode); in nilfs_add_nondir() 43 inode_dec_link_count(inode); in nilfs_add_nondir() 44 unlock_new_inode(inode); in nilfs_add_nondir() 45 iput(inode); in nilfs_add_nondir() 54 nilfs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) in nilfs_lookup() 56 struct inode *inode; in nilfs_lookup() local 63 inode = ino ? nilfs_iget(dir->i_sb, NILFS_I(dir)->i_root, ino) : NULL; in nilfs_lookup() 64 return d_splice_alias(inode, dentry); in nilfs_lookup() [all …]
|
/fs/ocfs2/ |
D | inode.c | 57 static int ocfs2_read_locked_inode(struct inode *inode, 59 static int ocfs2_init_locked_inode(struct inode *inode, void *opaque); 60 static int ocfs2_find_actor(struct inode *inode, void *opaque); 62 struct inode *inode, 65 static int ocfs2_filecheck_read_inode_block_full(struct inode *inode, 73 void ocfs2_set_inode_flags(struct inode *inode) in ocfs2_set_inode_flags() argument 75 unsigned int flags = OCFS2_I(inode)->ip_attr; in ocfs2_set_inode_flags() 77 inode->i_flags &= ~(S_IMMUTABLE | in ocfs2_set_inode_flags() 81 inode->i_flags |= S_IMMUTABLE; in ocfs2_set_inode_flags() 84 inode->i_flags |= S_SYNC; in ocfs2_set_inode_flags() [all …]
|
/fs/ext4/ |
D | inode.c | 54 static __u32 ext4_inode_csum(struct inode *inode, struct ext4_inode *raw, in ext4_inode_csum() argument 57 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in ext4_inode_csum() 69 if (EXT4_INODE_SIZE(inode->i_sb) > EXT4_GOOD_OLD_INODE_SIZE) { in ext4_inode_csum() 80 EXT4_INODE_SIZE(inode->i_sb) - offset); in ext4_inode_csum() 86 static int ext4_inode_csum_verify(struct inode *inode, struct ext4_inode *raw, in ext4_inode_csum_verify() argument 91 if (EXT4_SB(inode->i_sb)->s_es->s_creator_os != in ext4_inode_csum_verify() 93 !ext4_has_metadata_csum(inode->i_sb)) in ext4_inode_csum_verify() 97 calculated = ext4_inode_csum(inode, raw, ei); in ext4_inode_csum_verify() 98 if (EXT4_INODE_SIZE(inode->i_sb) > EXT4_GOOD_OLD_INODE_SIZE && in ext4_inode_csum_verify() 107 static void ext4_inode_csum_set(struct inode *inode, struct ext4_inode *raw, in ext4_inode_csum_set() argument [all …]
|
D | inline.c | 22 static int ext4_get_inline_size(struct inode *inode) in ext4_get_inline_size() argument 24 if (EXT4_I(inode)->i_inline_off) in ext4_get_inline_size() 25 return EXT4_I(inode)->i_inline_size; in ext4_get_inline_size() 30 static int get_max_inline_xattr_value_size(struct inode *inode, in get_max_inline_xattr_value_size() argument 38 min_offs = EXT4_SB(inode->i_sb)->s_inode_size - in get_max_inline_xattr_value_size() 40 EXT4_I(inode)->i_extra_isize - in get_max_inline_xattr_value_size() 48 if (!ext4_test_inode_state(inode, EXT4_STATE_XATTR)) in get_max_inline_xattr_value_size() 54 header = IHDR(inode, raw_inode); in get_max_inline_xattr_value_size() 68 if (EXT4_I(inode)->i_inline_off) { in get_max_inline_xattr_value_size() 70 ((void *)raw_inode + EXT4_I(inode)->i_inline_off); in get_max_inline_xattr_value_size() [all …]
|
/fs/ext2/ |
D | namei.c | 40 static inline int ext2_add_nondir(struct dentry *dentry, struct inode *inode) in ext2_add_nondir() argument 42 int err = ext2_add_link(dentry, inode); in ext2_add_nondir() 44 d_instantiate_new(dentry, inode); in ext2_add_nondir() 47 inode_dec_link_count(inode); in ext2_add_nondir() 48 discard_new_inode(inode); in ext2_add_nondir() 56 static struct dentry *ext2_lookup(struct inode * dir, struct dentry *dentry, unsigned int flags) in ext2_lookup() 58 struct inode * inode; in ext2_lookup() local 65 inode = NULL; in ext2_lookup() 67 inode = ext2_iget(dir->i_sb, ino); in ext2_lookup() 68 if (inode == ERR_PTR(-ESTALE)) { in ext2_lookup() [all …]
|
D | inode.c | 43 static int __ext2_write_inode(struct inode *inode, int do_sync); 48 static inline int ext2_inode_is_fast_symlink(struct inode *inode) in ext2_inode_is_fast_symlink() argument 50 int ea_blocks = EXT2_I(inode)->i_file_acl ? in ext2_inode_is_fast_symlink() 51 (inode->i_sb->s_blocksize >> 9) : 0; in ext2_inode_is_fast_symlink() 53 return (S_ISLNK(inode->i_mode) && in ext2_inode_is_fast_symlink() 54 inode->i_blocks - ea_blocks == 0); in ext2_inode_is_fast_symlink() 57 static void ext2_truncate_blocks(struct inode *inode, loff_t offset); 61 struct inode *inode = mapping->host; in ext2_write_failed() local 63 if (to > inode->i_size) { in ext2_write_failed() 64 truncate_pagecache(inode, inode->i_size); in ext2_write_failed() [all …]
|
/fs/hfsplus/ |
D | inode.c | 37 struct inode *inode = mapping->host; in hfsplus_write_failed() local 39 if (to > inode->i_size) { in hfsplus_write_failed() 40 truncate_pagecache(inode, inode->i_size); in hfsplus_write_failed() 41 hfsplus_file_truncate(inode); in hfsplus_write_failed() 68 struct inode *inode = page->mapping->host; in hfsplus_releasepage() local 69 struct super_block *sb = inode->i_sb; in hfsplus_releasepage() 75 switch (inode->i_ino) { in hfsplus_releasepage() 130 struct inode *inode = mapping->host; in hfsplus_direct_IO() local 134 ret = blockdev_direct_IO(iocb, inode, iter, hfsplus_get_block); in hfsplus_direct_IO() 141 loff_t isize = i_size_read(inode); in hfsplus_direct_IO() [all …]
|
/fs/ufs/ |
D | namei.c | 38 static inline int ufs_add_nondir(struct dentry *dentry, struct inode *inode) in ufs_add_nondir() argument 40 int err = ufs_add_link(dentry, inode); in ufs_add_nondir() 42 d_instantiate_new(dentry, inode); in ufs_add_nondir() 45 inode_dec_link_count(inode); in ufs_add_nondir() 46 discard_new_inode(inode); in ufs_add_nondir() 50 static struct dentry *ufs_lookup(struct inode * dir, struct dentry *dentry, unsigned int flags) in ufs_lookup() 52 struct inode * inode = NULL; in ufs_lookup() local 60 inode = ufs_iget(dir->i_sb, ino); in ufs_lookup() 61 return d_splice_alias(inode, dentry); in ufs_lookup() 72 static int ufs_create (struct inode * dir, struct dentry * dentry, umode_t mode, in ufs_create() [all …]
|
D | inode.c | 46 static int ufs_block_to_path(struct inode *inode, sector_t i_block, unsigned offsets[4]) in ufs_block_to_path() argument 48 struct ufs_sb_private_info *uspi = UFS_SB(inode->i_sb)->s_uspi; in ufs_block_to_path() 73 ufs_warning(inode->i_sb, "ufs_block_to_path", "block > big"); in ufs_block_to_path() 124 static u64 ufs_frag_map(struct inode *inode, unsigned offsets[4], int depth) in ufs_frag_map() argument 126 struct ufs_inode_info *ufsi = UFS_I(inode); in ufs_frag_map() 127 struct super_block *sb = inode->i_sb; in ufs_frag_map() 221 ufs_extend_tail(struct inode *inode, u64 writes_to, in ufs_extend_tail() argument 224 struct ufs_inode_info *ufsi = UFS_I(inode); in ufs_extend_tail() 225 struct super_block *sb = inode->i_sb; in ufs_extend_tail() 239 tmp = ufs_new_fragments(inode, p, lastfrag, ufs_data_ptr_to_cpu(sb, p), in ufs_extend_tail() [all …]
|
/fs/coda/ |
D | cnode.c | 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() [all …]
|
/fs/adfs/ |
D | inode.c | 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, inode->i_ino, block); in adfs_get_block() 25 map_bh(bh, inode->i_sb, block); in adfs_get_block() 47 struct inode *inode = mapping->host; in adfs_write_failed() local 49 if (to > inode->i_size) in adfs_write_failed() 50 truncate_pagecache(inode, inode->i_size); in adfs_write_failed() 86 adfs_atts2mode(struct super_block *sb, struct inode *inode) in adfs_atts2mode() argument 88 unsigned int attr = ADFS_I(inode)->attr; in adfs_atts2mode() 97 switch (adfs_filetype(ADFS_I(inode)->loadaddr)) { in adfs_atts2mode() [all …]
|
/fs/squashfs/ |
D | inode.c | 44 static int squashfs_new_inode(struct super_block *sb, struct inode *inode, in squashfs_new_inode() argument 59 i_uid_write(inode, i_uid); in squashfs_new_inode() 60 i_gid_write(inode, i_gid); in squashfs_new_inode() 61 inode->i_ino = le32_to_cpu(sqsh_ino->inode_number); in squashfs_new_inode() 62 inode->i_mtime.tv_sec = le32_to_cpu(sqsh_ino->mtime); in squashfs_new_inode() 63 inode->i_atime.tv_sec = inode->i_mtime.tv_sec; in squashfs_new_inode() 64 inode->i_ctime.tv_sec = inode->i_mtime.tv_sec; in squashfs_new_inode() 65 inode->i_mode = le16_to_cpu(sqsh_ino->mode); in squashfs_new_inode() 66 inode->i_size = 0; in squashfs_new_inode() 72 struct inode *squashfs_iget(struct super_block *sb, long long ino, in squashfs_iget() [all …]
|
/fs/erofs/ |
D | inode.c | 12 static int erofs_read_inode(struct inode *inode, void *data) in erofs_read_inode() argument 14 struct erofs_inode *vi = EROFS_I(inode); in erofs_read_inode() 19 struct erofs_sb_info *sbi = EROFS_SB(inode->i_sb); in erofs_read_inode() 25 erofs_err(inode->i_sb, "unsupported datalayout %u of nid %llu", in erofs_read_inode() 38 inode->i_mode = le16_to_cpu(die->i_mode); in erofs_read_inode() 39 switch (inode->i_mode & S_IFMT) { in erofs_read_inode() 47 inode->i_rdev = in erofs_read_inode() 52 inode->i_rdev = 0; in erofs_read_inode() 57 i_uid_write(inode, le32_to_cpu(die->i_uid)); in erofs_read_inode() 58 i_gid_write(inode, le32_to_cpu(die->i_gid)); in erofs_read_inode() [all …]
|
/fs/fat/ |
D | file.c | 24 static int fat_ioctl_get_attributes(struct inode *inode, u32 __user *user_attr) in fat_ioctl_get_attributes() argument 28 inode_lock(inode); in fat_ioctl_get_attributes() 29 attr = fat_make_attrs(inode); in fat_ioctl_get_attributes() 30 inode_unlock(inode); in fat_ioctl_get_attributes() 37 struct inode *inode = file_inode(file); in fat_ioctl_set_attributes() local 38 struct msdos_sb_info *sbi = MSDOS_SB(inode->i_sb); in fat_ioctl_set_attributes() 39 int is_dir = S_ISDIR(inode->i_mode); in fat_ioctl_set_attributes() 51 inode_lock(inode); in fat_ioctl_set_attributes() 61 attr |= (MSDOS_I(inode)->i_attrs & ATTR_VOLUME) | in fat_ioctl_set_attributes() 63 oldattr = fat_make_attrs(inode); in fat_ioctl_set_attributes() [all …]
|