Home
last modified time | relevance | path

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

12345678910>>...37

/fs/
Dinode.c116 static int no_open(struct inode *inode, struct file *file) in no_open() argument
129 int inode_init_always(struct super_block *sb, struct inode *inode) in inode_init_always() argument
133 struct address_space *const mapping = &inode->i_data; in inode_init_always()
135 inode->i_sb = sb; in inode_init_always()
136 inode->i_blkbits = sb->s_blocksize_bits; in inode_init_always()
137 inode->i_flags = 0; in inode_init_always()
138 atomic64_set(&inode->i_sequence, 0); in inode_init_always()
139 atomic_set(&inode->i_count, 1); in inode_init_always()
140 inode->i_op = &empty_iops; in inode_init_always()
141 inode->i_fop = &no_open_fops; in inode_init_always()
[all …]
Dfs-writeback.c86 static inline struct inode *wb_inode(struct list_head *head) in wb_inode()
88 return list_entry(head, struct inode, i_io_list); in wb_inode()
134 static bool inode_io_list_move_locked(struct inode *inode, in inode_io_list_move_locked() argument
140 list_move(&inode->i_io_list, head); in inode_io_list_move_locked()
158 static void inode_io_list_del_locked(struct inode *inode, in inode_io_list_del_locked() argument
162 assert_spin_locked(&inode->i_lock); in inode_io_list_del_locked()
164 inode->i_state &= ~I_SYNC_QUEUED; in inode_io_list_del_locked()
165 list_del_init(&inode->i_io_list); in inode_io_list_del_locked()
244 void __inode_attach_wb(struct inode *inode, struct page *page) in __inode_attach_wb() argument
246 struct backing_dev_info *bdi = inode_to_bdi(inode); in __inode_attach_wb()
[all …]
/fs/f2fs/
Dinode.c23 void f2fs_mark_inode_dirty_sync(struct inode *inode, bool sync) in f2fs_mark_inode_dirty_sync() argument
25 if (is_inode_flag_set(inode, FI_NEW_INODE)) in f2fs_mark_inode_dirty_sync()
28 if (f2fs_inode_dirtied(inode, sync)) in f2fs_mark_inode_dirty_sync()
31 mark_inode_dirty_sync(inode); in f2fs_mark_inode_dirty_sync()
34 void f2fs_set_inode_flags(struct inode *inode) in f2fs_set_inode_flags() argument
36 unsigned int flags = F2FS_I(inode)->i_flags; in f2fs_set_inode_flags()
49 if (f2fs_encrypted_inode(inode)) in f2fs_set_inode_flags()
51 inode_set_flags(inode, new_fl, in f2fs_set_inode_flags()
56 static void __get_inode_rdev(struct inode *inode, struct f2fs_inode *ri) in __get_inode_rdev() argument
58 int extra_size = get_extra_isize(inode); in __get_inode_rdev()
[all …]
Dfile.c40 struct inode *inode = file_inode(vma->vm_file); in f2fs_filemap_fault() local
43 down_read(&F2FS_I(inode)->i_mmap_sem); in f2fs_filemap_fault()
45 up_read(&F2FS_I(inode)->i_mmap_sem); in f2fs_filemap_fault()
54 struct inode *inode = file_inode(vma->vm_file); in f2fs_vm_page_mkwrite() local
55 struct f2fs_sb_info *sbi = F2FS_I_SB(inode); in f2fs_vm_page_mkwrite()
64 sb_start_pagefault(inode->i_sb); in f2fs_vm_page_mkwrite()
66 f2fs_bug_on(sbi, f2fs_has_inline_data(inode)); in f2fs_vm_page_mkwrite()
70 set_new_dnode(&dn, inode, NULL, NULL, 0); in f2fs_vm_page_mkwrite()
82 down_read(&F2FS_I(inode)->i_mmap_sem); in f2fs_vm_page_mkwrite()
84 if (unlikely(page->mapping != inode->i_mapping || in f2fs_vm_page_mkwrite()
[all …]
/fs/affs/
Dinode.c16 struct inode *affs_iget(struct super_block *sb, unsigned long ino) in affs_iget()
21 struct inode *inode; in affs_iget() local
27 inode = iget_locked(sb, ino); in affs_iget()
28 if (!inode) in affs_iget()
30 if (!(inode->i_state & I_NEW)) in affs_iget()
31 return inode; in affs_iget()
33 pr_debug("affs_iget(%lu)\n", inode->i_ino); in affs_iget()
35 block = inode->i_ino; in affs_iget()
51 inode->i_size = 0; in affs_iget()
52 set_nlink(inode, 1); in affs_iget()
[all …]
/fs/nfs/
Dinode.c63 static void nfs_invalidate_inode(struct inode *);
64 static int nfs_update_inode(struct inode *, struct nfs_fattr *);
110 int nfs_drop_inode(struct inode *inode) in nfs_drop_inode() argument
112 return NFS_STALE(inode) || generic_drop_inode(inode); in nfs_drop_inode()
116 void nfs_clear_inode(struct inode *inode) in nfs_clear_inode() argument
121 WARN_ON_ONCE(nfs_have_writebacks(inode)); in nfs_clear_inode()
122 WARN_ON_ONCE(!list_empty(&NFS_I(inode)->open_files)); in nfs_clear_inode()
123 nfs_zap_acl_cache(inode); in nfs_clear_inode()
124 nfs_access_zap_cache(inode); in nfs_clear_inode()
125 nfs_fscache_clear_inode(inode); in nfs_clear_inode()
[all …]
/fs/hfs/
Dinode.c41 struct inode *inode = mapping->host; in hfs_write_failed() local
43 if (to > inode->i_size) { in hfs_write_failed()
44 truncate_pagecache(inode, inode->i_size); in hfs_write_failed()
45 hfs_file_truncate(inode); in hfs_write_failed()
72 struct inode *inode = page->mapping->host; in hfs_releasepage() local
73 struct super_block *sb = inode->i_sb; in hfs_releasepage()
79 switch (inode->i_ino) { in hfs_releasepage()
132 struct inode *inode = file_inode(file)->i_mapping->host; in hfs_direct_IO() local
136 ret = blockdev_direct_IO(iocb, inode, iter, offset, hfs_get_block); in hfs_direct_IO()
143 loff_t isize = i_size_read(inode); in hfs_direct_IO()
[all …]
/fs/logfs/
Dinode.c53 static void logfs_inode_setops(struct inode *inode) in logfs_inode_setops() argument
55 switch (inode->i_mode & S_IFMT) { in logfs_inode_setops()
57 inode->i_op = &logfs_dir_iops; in logfs_inode_setops()
58 inode->i_fop = &logfs_dir_fops; in logfs_inode_setops()
59 inode->i_mapping->a_ops = &logfs_reg_aops; in logfs_inode_setops()
62 inode->i_op = &logfs_reg_iops; in logfs_inode_setops()
63 inode->i_fop = &logfs_reg_fops; in logfs_inode_setops()
64 inode->i_mapping->a_ops = &logfs_reg_aops; in logfs_inode_setops()
67 inode->i_op = &logfs_symlink_iops; in logfs_inode_setops()
68 inode->i_mapping->a_ops = &logfs_reg_aops; in logfs_inode_setops()
[all …]
/fs/reiserfs/
Dinode.c26 void reiserfs_evict_inode(struct inode *inode) in reiserfs_evict_inode() argument
34 2 * REISERFS_QUOTA_INIT_BLOCKS(inode->i_sb); in reiserfs_evict_inode()
38 if (!inode->i_nlink && !is_bad_inode(inode)) in reiserfs_evict_inode()
39 dquot_initialize(inode); in reiserfs_evict_inode()
41 truncate_inode_pages_final(&inode->i_data); in reiserfs_evict_inode()
42 if (inode->i_nlink) in reiserfs_evict_inode()
50 if (!(inode->i_state & I_NEW) && INODE_PKEY(inode)->k_objectid != 0) { in reiserfs_evict_inode()
52 reiserfs_delete_xattrs(inode); in reiserfs_evict_inode()
54 reiserfs_write_lock(inode->i_sb); in reiserfs_evict_inode()
56 if (journal_begin(&th, inode->i_sb, jbegin_count)) in reiserfs_evict_inode()
[all …]
/fs/ocfs2/
Dinode.c69 static int ocfs2_read_locked_inode(struct inode *inode,
71 static int ocfs2_init_locked_inode(struct inode *inode, void *opaque);
72 static int ocfs2_find_actor(struct inode *inode, void *opaque);
74 struct inode *inode,
77 void ocfs2_set_inode_flags(struct inode *inode) in ocfs2_set_inode_flags() argument
79 unsigned int flags = OCFS2_I(inode)->ip_attr; in ocfs2_set_inode_flags()
81 inode->i_flags &= ~(S_IMMUTABLE | in ocfs2_set_inode_flags()
85 inode->i_flags |= S_IMMUTABLE; in ocfs2_set_inode_flags()
88 inode->i_flags |= S_SYNC; in ocfs2_set_inode_flags()
90 inode->i_flags |= S_APPEND; in ocfs2_set_inode_flags()
[all …]
/fs/nilfs2/
Dinode.c52 static int nilfs_iget_test(struct inode *inode, void *opaque);
54 void nilfs_inode_add_blocks(struct inode *inode, int n) in nilfs_inode_add_blocks() argument
56 struct nilfs_root *root = NILFS_I(inode)->i_root; in nilfs_inode_add_blocks()
58 inode_add_bytes(inode, i_blocksize(inode) * n); in nilfs_inode_add_blocks()
63 void nilfs_inode_sub_blocks(struct inode *inode, int n) in nilfs_inode_sub_blocks() argument
65 struct nilfs_root *root = NILFS_I(inode)->i_root; in nilfs_inode_sub_blocks()
67 inode_sub_bytes(inode, i_blocksize(inode) * n); in nilfs_inode_sub_blocks()
83 int nilfs_get_block(struct inode *inode, sector_t blkoff, in nilfs_get_block() argument
86 struct nilfs_inode_info *ii = NILFS_I(inode); in nilfs_get_block()
87 struct the_nilfs *nilfs = inode->i_sb->s_fs_info; in nilfs_get_block()
[all …]
Dalloc.c40 nilfs_palloc_groups_per_desc_block(const struct inode *inode) in nilfs_palloc_groups_per_desc_block() argument
42 return (1UL << inode->i_blkbits) / in nilfs_palloc_groups_per_desc_block()
51 nilfs_palloc_groups_count(const struct inode *inode) in nilfs_palloc_groups_count() argument
53 return 1UL << (BITS_PER_LONG - (inode->i_blkbits + 3 /* log2(8) */)); in nilfs_palloc_groups_count()
61 int nilfs_palloc_init_blockgroup(struct inode *inode, unsigned entry_size) in nilfs_palloc_init_blockgroup() argument
63 struct nilfs_mdt_info *mi = NILFS_MDT(inode); in nilfs_palloc_init_blockgroup()
71 nilfs_mdt_set_entry_size(inode, entry_size, 0); in nilfs_palloc_init_blockgroup()
74 DIV_ROUND_UP(nilfs_palloc_entries_per_group(inode), in nilfs_palloc_init_blockgroup()
79 nilfs_palloc_groups_per_desc_block(inode) * in nilfs_palloc_init_blockgroup()
92 static unsigned long nilfs_palloc_group(const struct inode *inode, __u64 nr, in nilfs_palloc_group() argument
[all …]
Dnamei.c49 static inline int nilfs_add_nondir(struct dentry *dentry, struct inode *inode) in nilfs_add_nondir() argument
51 int err = nilfs_add_link(dentry, inode); in nilfs_add_nondir()
53 d_instantiate_new(dentry, inode); in nilfs_add_nondir()
56 inode_dec_link_count(inode); in nilfs_add_nondir()
57 unlock_new_inode(inode); in nilfs_add_nondir()
58 iput(inode); in nilfs_add_nondir()
67 nilfs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) in nilfs_lookup()
69 struct inode *inode; in nilfs_lookup() local
76 inode = ino ? nilfs_iget(dir->i_sb, NILFS_I(dir)->i_root, ino) : NULL; in nilfs_lookup()
77 return d_splice_alias(inode, dentry); in nilfs_lookup()
[all …]
/fs/ext4/
Dinode.c51 static __u32 ext4_inode_csum(struct inode *inode, struct ext4_inode *raw, in ext4_inode_csum() argument
54 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in ext4_inode_csum()
66 if (EXT4_INODE_SIZE(inode->i_sb) > EXT4_GOOD_OLD_INODE_SIZE) { in ext4_inode_csum()
77 EXT4_INODE_SIZE(inode->i_sb) - offset); in ext4_inode_csum()
83 static int ext4_inode_csum_verify(struct inode *inode, struct ext4_inode *raw, in ext4_inode_csum_verify() argument
88 if (EXT4_SB(inode->i_sb)->s_es->s_creator_os != in ext4_inode_csum_verify()
90 !ext4_has_metadata_csum(inode->i_sb)) in ext4_inode_csum_verify()
94 calculated = ext4_inode_csum(inode, raw, ei); in ext4_inode_csum_verify()
95 if (EXT4_INODE_SIZE(inode->i_sb) > EXT4_GOOD_OLD_INODE_SIZE && in ext4_inode_csum_verify()
104 static void ext4_inode_csum_set(struct inode *inode, struct ext4_inode *raw, in ext4_inode_csum_set() argument
[all …]
Dinline.c28 static int ext4_get_inline_size(struct inode *inode) in ext4_get_inline_size() argument
30 if (EXT4_I(inode)->i_inline_off) in ext4_get_inline_size()
31 return EXT4_I(inode)->i_inline_size; in ext4_get_inline_size()
36 static int get_max_inline_xattr_value_size(struct inode *inode, in get_max_inline_xattr_value_size() argument
44 min_offs = EXT4_SB(inode->i_sb)->s_inode_size - in get_max_inline_xattr_value_size()
46 EXT4_I(inode)->i_extra_isize - in get_max_inline_xattr_value_size()
54 if (!ext4_test_inode_state(inode, EXT4_STATE_XATTR)) in get_max_inline_xattr_value_size()
60 header = IHDR(inode, raw_inode); in get_max_inline_xattr_value_size()
74 if (EXT4_I(inode)->i_inline_off) { in get_max_inline_xattr_value_size()
76 ((void *)raw_inode + EXT4_I(inode)->i_inline_off); in get_max_inline_xattr_value_size()
[all …]
/fs/ext2/
Dnamei.c39 static inline int ext2_add_nondir(struct dentry *dentry, struct inode *inode) in ext2_add_nondir() argument
41 int err = ext2_add_link(dentry, inode); in ext2_add_nondir()
43 d_instantiate_new(dentry, inode); in ext2_add_nondir()
46 inode_dec_link_count(inode); in ext2_add_nondir()
47 unlock_new_inode(inode); in ext2_add_nondir()
48 iput(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()
[all …]
Dinode.c40 static int __ext2_write_inode(struct inode *inode, int do_sync);
45 static inline int ext2_inode_is_fast_symlink(struct inode *inode) in ext2_inode_is_fast_symlink() argument
47 int ea_blocks = EXT2_I(inode)->i_file_acl ? in ext2_inode_is_fast_symlink()
48 (inode->i_sb->s_blocksize >> 9) : 0; in ext2_inode_is_fast_symlink()
50 return (S_ISLNK(inode->i_mode) && in ext2_inode_is_fast_symlink()
51 inode->i_blocks - ea_blocks == 0); in ext2_inode_is_fast_symlink()
54 static void ext2_truncate_blocks(struct inode *inode, loff_t offset);
58 struct inode *inode = mapping->host; in ext2_write_failed() local
60 if (to > inode->i_size) { in ext2_write_failed()
61 truncate_pagecache(inode, inode->i_size); in ext2_write_failed()
[all …]
/fs/hfsplus/
Dinode.c36 struct inode *inode = mapping->host; in hfsplus_write_failed() local
38 if (to > inode->i_size) { in hfsplus_write_failed()
39 truncate_pagecache(inode, inode->i_size); in hfsplus_write_failed()
40 hfsplus_file_truncate(inode); in hfsplus_write_failed()
67 struct inode *inode = page->mapping->host; in hfsplus_releasepage() local
68 struct super_block *sb = inode->i_sb; in hfsplus_releasepage()
74 switch (inode->i_ino) { in hfsplus_releasepage()
130 struct inode *inode = file_inode(file)->i_mapping->host; in hfsplus_direct_IO() local
134 ret = blockdev_direct_IO(iocb, inode, iter, offset, hfsplus_get_block); in hfsplus_direct_IO()
141 loff_t isize = i_size_read(inode); in hfsplus_direct_IO()
[all …]
/fs/ufs/
Dnamei.c37 static inline int ufs_add_nondir(struct dentry *dentry, struct inode *inode) in ufs_add_nondir() argument
39 int err = ufs_add_link(dentry, inode); in ufs_add_nondir()
41 d_instantiate_new(dentry, inode); in ufs_add_nondir()
44 inode_dec_link_count(inode); in ufs_add_nondir()
45 unlock_new_inode(inode); in ufs_add_nondir()
46 iput(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()
[all …]
Dinode.c44 static int ufs_block_to_path(struct inode *inode, sector_t i_block, unsigned offsets[4]) in ufs_block_to_path() argument
46 struct ufs_sb_private_info *uspi = UFS_SB(inode->i_sb)->s_uspi; in ufs_block_to_path()
71 ufs_warning(inode->i_sb, "ufs_block_to_path", "block > big"); in ufs_block_to_path()
122 static u64 ufs_frag_map(struct inode *inode, unsigned offsets[4], int depth) in ufs_frag_map() argument
124 struct ufs_inode_info *ufsi = UFS_I(inode); in ufs_frag_map()
125 struct super_block *sb = inode->i_sb; in ufs_frag_map()
219 ufs_extend_tail(struct inode *inode, u64 writes_to, in ufs_extend_tail() argument
222 struct ufs_inode_info *ufsi = UFS_I(inode); in ufs_extend_tail()
223 struct super_block *sb = inode->i_sb; in ufs_extend_tail()
237 tmp = ufs_new_fragments(inode, p, lastfrag, ufs_data_ptr_to_cpu(sb, p), in ufs_extend_tail()
[all …]
/fs/adfs/
Dinode.c19 adfs_get_block(struct inode *inode, sector_t block, struct buffer_head *bh, in adfs_get_block() argument
23 if (block >= inode->i_blocks) in adfs_get_block()
26 block = __adfs_block_map(inode->i_sb, inode->i_ino, block); in adfs_get_block()
28 map_bh(bh, inode->i_sb, block); in adfs_get_block()
50 struct inode *inode = mapping->host; in adfs_write_failed() local
52 if (to > inode->i_size) in adfs_write_failed()
53 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_I(inode)->filetype) { in adfs_atts2mode()
[all …]
/fs/exofs/
Dnamei.c36 static inline int exofs_add_nondir(struct dentry *dentry, struct inode *inode) in exofs_add_nondir() argument
38 int err = exofs_add_link(dentry, inode); in exofs_add_nondir()
40 d_instantiate(dentry, inode); in exofs_add_nondir()
43 inode_dec_link_count(inode); in exofs_add_nondir()
44 iput(inode); in exofs_add_nondir()
48 static struct dentry *exofs_lookup(struct inode *dir, struct dentry *dentry, in exofs_lookup()
51 struct inode *inode; in exofs_lookup() local
58 inode = ino ? exofs_iget(dir->i_sb, ino) : NULL; in exofs_lookup()
59 return d_splice_alias(inode, dentry); in exofs_lookup()
62 static int exofs_create(struct inode *dir, struct dentry *dentry, umode_t mode, in exofs_create()
[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/fat/
Dfile.c19 static int fat_ioctl_get_attributes(struct inode *inode, u32 __user *user_attr) in fat_ioctl_get_attributes() argument
23 mutex_lock(&inode->i_mutex); in fat_ioctl_get_attributes()
24 attr = fat_make_attrs(inode); in fat_ioctl_get_attributes()
25 mutex_unlock(&inode->i_mutex); in fat_ioctl_get_attributes()
32 struct inode *inode = file_inode(file); in fat_ioctl_set_attributes() local
33 struct msdos_sb_info *sbi = MSDOS_SB(inode->i_sb); in fat_ioctl_set_attributes()
34 int is_dir = S_ISDIR(inode->i_mode); in fat_ioctl_set_attributes()
46 mutex_lock(&inode->i_mutex); in fat_ioctl_set_attributes()
56 attr |= (MSDOS_I(inode)->i_attrs & ATTR_VOLUME) | in fat_ioctl_set_attributes()
58 oldattr = fat_make_attrs(inode); in fat_ioctl_set_attributes()
[all …]
/fs/squashfs/
Dinode.c56 static int squashfs_new_inode(struct super_block *sb, struct inode *inode, in squashfs_new_inode() argument
71 i_uid_write(inode, i_uid); in squashfs_new_inode()
72 i_gid_write(inode, i_gid); in squashfs_new_inode()
73 inode->i_ino = le32_to_cpu(sqsh_ino->inode_number); in squashfs_new_inode()
74 inode->i_mtime.tv_sec = le32_to_cpu(sqsh_ino->mtime); in squashfs_new_inode()
75 inode->i_atime.tv_sec = inode->i_mtime.tv_sec; in squashfs_new_inode()
76 inode->i_ctime.tv_sec = inode->i_mtime.tv_sec; in squashfs_new_inode()
77 inode->i_mode = le16_to_cpu(sqsh_ino->mode); in squashfs_new_inode()
78 inode->i_size = 0; in squashfs_new_inode()
84 struct inode *squashfs_iget(struct super_block *sb, long long ino, in squashfs_iget()
[all …]

12345678910>>...37