Home
last modified time | relevance | path

Searched refs:inode (Results 1 – 25 of 972) sorted by relevance

12345678910>>...39

/fs/
Dinode.c119 static int no_open(struct inode *inode, struct file *file) in no_open() argument
132 int inode_init_always(struct super_block *sb, struct inode *inode) in inode_init_always() argument
136 struct address_space *const mapping = &inode->i_data; in inode_init_always()
138 inode->i_sb = sb; in inode_init_always()
139 inode->i_blkbits = sb->s_blocksize_bits; in inode_init_always()
140 inode->i_flags = 0; in inode_init_always()
141 atomic64_set(&inode->i_sequence, 0); in inode_init_always()
142 atomic_set(&inode->i_count, 1); in inode_init_always()
143 inode->i_op = &empty_iops; in inode_init_always()
144 inode->i_fop = &no_open_fops; in inode_init_always()
[all …]
Dfs-writeback.c70 static inline struct inode *wb_inode(struct list_head *head) in wb_inode()
72 return list_entry(head, struct inode, i_io_list); in wb_inode()
118 static bool inode_io_list_move_locked(struct inode *inode, in inode_io_list_move_locked() argument
124 list_move(&inode->i_io_list, head); in inode_io_list_move_locked()
142 static void inode_io_list_del_locked(struct inode *inode, in inode_io_list_del_locked() argument
146 assert_spin_locked(&inode->i_lock); in inode_io_list_del_locked()
148 inode->i_state &= ~I_SYNC_QUEUED; in inode_io_list_del_locked()
149 list_del_init(&inode->i_io_list); in inode_io_list_del_locked()
250 void __inode_attach_wb(struct inode *inode, struct page *page) in __inode_attach_wb() argument
252 struct backing_dev_info *bdi = inode_to_bdi(inode); in __inode_attach_wb()
[all …]
/fs/f2fs/
Dinode.c25 void f2fs_mark_inode_dirty_sync(struct inode *inode, bool sync) in f2fs_mark_inode_dirty_sync() argument
27 if (is_inode_flag_set(inode, FI_NEW_INODE)) in f2fs_mark_inode_dirty_sync()
30 if (f2fs_inode_dirtied(inode, sync)) in f2fs_mark_inode_dirty_sync()
33 mark_inode_dirty_sync(inode); in f2fs_mark_inode_dirty_sync()
36 void f2fs_set_inode_flags(struct inode *inode) in f2fs_set_inode_flags() argument
38 unsigned int flags = F2FS_I(inode)->i_flags; in f2fs_set_inode_flags()
51 if (file_is_encrypt(inode)) in f2fs_set_inode_flags()
53 if (file_is_verity(inode)) in f2fs_set_inode_flags()
57 inode_set_flags(inode, new_fl, in f2fs_set_inode_flags()
62 static void __get_inode_rdev(struct inode *inode, struct f2fs_inode *ri) in __get_inode_rdev() argument
[all …]
Dfile.c37 struct inode *inode = file_inode(vmf->vma->vm_file); in f2fs_filemap_fault() local
40 f2fs_down_read(&F2FS_I(inode)->i_mmap_sem); in f2fs_filemap_fault()
42 f2fs_up_read(&F2FS_I(inode)->i_mmap_sem); in f2fs_filemap_fault()
45 f2fs_update_iostat(F2FS_I_SB(inode), APP_MAPPED_READ_IO, in f2fs_filemap_fault()
48 trace_f2fs_filemap_fault(inode, vmf->pgoff, (unsigned long)ret); in f2fs_filemap_fault()
56 struct inode *inode = file_inode(vmf->vma->vm_file); in f2fs_vm_page_mkwrite() local
57 struct f2fs_sb_info *sbi = F2FS_I_SB(inode); in f2fs_vm_page_mkwrite()
62 if (unlikely(IS_IMMUTABLE(inode))) in f2fs_vm_page_mkwrite()
65 if (is_inode_flag_set(inode, FI_COMPRESS_RELEASED)) in f2fs_vm_page_mkwrite()
78 err = f2fs_convert_inline_inode(inode); in f2fs_vm_page_mkwrite()
[all …]
/fs/affs/
Dinode.c18 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 …]
/fs/nfs/
Dinode.c65 static int nfs_update_inode(struct inode *, struct nfs_fattr *);
112 int nfs_drop_inode(struct inode *inode) in nfs_drop_inode() argument
114 return NFS_STALE(inode) || generic_drop_inode(inode); in nfs_drop_inode()
118 void nfs_clear_inode(struct inode *inode) in nfs_clear_inode() argument
123 WARN_ON_ONCE(nfs_have_writebacks(inode)); in nfs_clear_inode()
124 WARN_ON_ONCE(!list_empty(&NFS_I(inode)->open_files)); in nfs_clear_inode()
125 nfs_zap_acl_cache(inode); in nfs_clear_inode()
126 nfs_access_zap_cache(inode); in nfs_clear_inode()
127 nfs_fscache_clear_inode(inode); in nfs_clear_inode()
131 void nfs_evict_inode(struct inode *inode) in nfs_evict_inode() argument
[all …]
/fs/nilfs2/
Dinode.c44 static int nilfs_iget_test(struct inode *inode, void *opaque);
46 void nilfs_inode_add_blocks(struct inode *inode, int n) in nilfs_inode_add_blocks() argument
48 struct nilfs_root *root = NILFS_I(inode)->i_root; in nilfs_inode_add_blocks()
50 inode_add_bytes(inode, i_blocksize(inode) * n); in nilfs_inode_add_blocks()
55 void nilfs_inode_sub_blocks(struct inode *inode, int n) in nilfs_inode_sub_blocks() argument
57 struct nilfs_root *root = NILFS_I(inode)->i_root; in nilfs_inode_sub_blocks()
59 inode_sub_bytes(inode, i_blocksize(inode) * n); in nilfs_inode_sub_blocks()
75 int nilfs_get_block(struct inode *inode, sector_t blkoff, in nilfs_get_block() argument
78 struct nilfs_inode_info *ii = NILFS_I(inode); in nilfs_get_block()
79 struct the_nilfs *nilfs = inode->i_sb->s_fs_info; in nilfs_get_block()
[all …]
Dalloc.c26 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 …]
Dnamei.c35 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 …]
Dmdt.c30 nilfs_mdt_insert_new_block(struct inode *inode, unsigned long block, in nilfs_mdt_insert_new_block() argument
32 void (*init_block)(struct inode *, in nilfs_mdt_insert_new_block() argument
35 struct nilfs_inode_info *ii = NILFS_I(inode); in nilfs_mdt_insert_new_block()
51 memset(kaddr + bh_offset(bh), 0, i_blocksize(inode)); in nilfs_mdt_insert_new_block()
53 init_block(inode, bh, kaddr); in nilfs_mdt_insert_new_block()
59 nilfs_mdt_mark_dirty(inode); in nilfs_mdt_insert_new_block()
61 trace_nilfs2_mdt_insert_new_block(inode, inode->i_ino, block); in nilfs_mdt_insert_new_block()
66 static int nilfs_mdt_create_block(struct inode *inode, unsigned long block, in nilfs_mdt_create_block() argument
68 void (*init_block)(struct inode *, in nilfs_mdt_create_block() argument
72 struct super_block *sb = inode->i_sb; in nilfs_mdt_create_block()
[all …]
Dmdt.h26 struct inode *inode; member
54 static inline struct nilfs_mdt_info *NILFS_MDT(const struct inode *inode) in NILFS_MDT() argument
56 return inode->i_private; in NILFS_MDT()
59 static inline int nilfs_is_metadata_file_inode(const struct inode *inode) in nilfs_is_metadata_file_inode() argument
61 return inode->i_private != NULL; in nilfs_is_metadata_file_inode()
67 int nilfs_mdt_get_block(struct inode *, unsigned long, int,
68 void (*init_block)(struct inode *,
71 int nilfs_mdt_find_block(struct inode *inode, unsigned long start,
74 int nilfs_mdt_delete_block(struct inode *, unsigned long);
75 int nilfs_mdt_forget_block(struct inode *, unsigned long);
[all …]
/fs/reiserfs/
Dinode.c27 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/hfs/
Dinode.c44 struct inode *inode = mapping->host; in hfs_write_failed() local
46 if (to > inode->i_size) { in hfs_write_failed()
47 truncate_pagecache(inode, inode->i_size); in hfs_write_failed()
48 hfs_file_truncate(inode); in hfs_write_failed()
75 struct inode *inode = page->mapping->host; in hfs_releasepage() local
76 struct super_block *sb = inode->i_sb; in hfs_releasepage()
82 switch (inode->i_ino) { in hfs_releasepage()
134 struct inode *inode = mapping->host; in hfs_direct_IO() local
138 ret = blockdev_direct_IO(iocb, inode, iter, hfs_get_block); in hfs_direct_IO()
145 loff_t isize = i_size_read(inode); in hfs_direct_IO()
[all …]
/fs/ocfs2/
Dinode.c57 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/
Dinode.c52 static __u32 ext4_inode_csum(struct inode *inode, struct ext4_inode *raw, in ext4_inode_csum() argument
55 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in ext4_inode_csum()
67 if (EXT4_INODE_SIZE(inode->i_sb) > EXT4_GOOD_OLD_INODE_SIZE) { in ext4_inode_csum()
78 EXT4_INODE_SIZE(inode->i_sb) - offset); in ext4_inode_csum()
84 static int ext4_inode_csum_verify(struct inode *inode, struct ext4_inode *raw, in ext4_inode_csum_verify() argument
89 if (EXT4_SB(inode->i_sb)->s_es->s_creator_os != in ext4_inode_csum_verify()
91 !ext4_has_metadata_csum(inode->i_sb)) in ext4_inode_csum_verify()
95 calculated = ext4_inode_csum(inode, raw, ei); in ext4_inode_csum_verify()
96 if (EXT4_INODE_SIZE(inode->i_sb) > EXT4_GOOD_OLD_INODE_SIZE && in ext4_inode_csum_verify()
105 void ext4_inode_csum_set(struct inode *inode, struct ext4_inode *raw, in ext4_inode_csum_set() argument
[all …]
Dinline.c22 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
39 if (!EXT4_INODE_HAS_XATTR_SPACE(inode)) in get_max_inline_xattr_value_size()
42 min_offs = EXT4_SB(inode->i_sb)->s_inode_size - in get_max_inline_xattr_value_size()
44 EXT4_I(inode)->i_extra_isize - in get_max_inline_xattr_value_size()
52 if (!ext4_test_inode_state(inode, EXT4_STATE_XATTR)) in get_max_inline_xattr_value_size()
58 header = IHDR(inode, raw_inode); in get_max_inline_xattr_value_size()
60 end = (void *)raw_inode + EXT4_SB(inode->i_sb)->s_inode_size; in get_max_inline_xattr_value_size()
[all …]
/fs/hfsplus/
Dinode.c37 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/
Dnamei.c38 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 …]
Dinode.c46 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/ext2/
Dinode.c43 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 …]
Dnamei.c40 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
69 inode = NULL; in ext2_lookup()
71 inode = ext2_iget(dir->i_sb, ino); in ext2_lookup()
72 if (inode == ERR_PTR(-ESTALE)) { in ext2_lookup()
[all …]
/fs/coda/
Dcnode.c26 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/
Dinode.c16 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()
87 adfs_atts2mode(struct super_block *sb, struct inode *inode) in adfs_atts2mode() argument
89 unsigned int attr = ADFS_I(inode)->attr; in adfs_atts2mode()
98 switch (adfs_filetype(ADFS_I(inode)->loadaddr)) { in adfs_atts2mode()
[all …]
/fs/squashfs/
Dinode.c44 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/fat/
Dfile.c24 static int fat_ioctl_get_attributes(struct inode *inode, u32 __user *user_attr) in fat_ioctl_get_attributes() argument
28 inode_lock_shared(inode); in fat_ioctl_get_attributes()
29 attr = fat_make_attrs(inode); in fat_ioctl_get_attributes()
30 inode_unlock_shared(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 …]

12345678910>>...39