Home
last modified time | relevance | path

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

12345678910>>...41

/fs/
Dinode.c118 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 atomic64_set(&inode->i_sequence, 0); in inode_init_always()
141 atomic_set(&inode->i_count, 1); in inode_init_always()
142 inode->i_op = &empty_iops; in inode_init_always()
143 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
123 assert_spin_locked(&inode->i_lock); in inode_io_list_move_locked()
125 list_move(&inode->i_io_list, head); in inode_io_list_move_locked()
234 / sizeof(struct inode *))
239 void __inode_attach_wb(struct inode *inode, struct page *page) in __inode_attach_wb() argument
241 struct backing_dev_info *bdi = inode_to_bdi(inode); in __inode_attach_wb()
244 if (inode_cgwb_enabled(inode)) { in __inode_attach_wb()
265 if (unlikely(cmpxchg(&inode->i_wb, NULL, wb))) 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 …]
/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.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.c55 static int ocfs2_read_locked_inode(struct inode *inode,
57 static int ocfs2_init_locked_inode(struct inode *inode, void *opaque);
58 static int ocfs2_find_actor(struct inode *inode, void *opaque);
60 struct inode *inode,
63 static int ocfs2_filecheck_read_inode_block_full(struct inode *inode,
71 void ocfs2_set_inode_flags(struct inode *inode) in ocfs2_set_inode_flags() argument
73 unsigned int flags = OCFS2_I(inode)->ip_attr; in ocfs2_set_inode_flags()
75 inode->i_flags &= ~(S_IMMUTABLE | in ocfs2_set_inode_flags()
79 inode->i_flags |= S_IMMUTABLE; in ocfs2_set_inode_flags()
82 inode->i_flags |= S_SYNC; in ocfs2_set_inode_flags()
[all …]
/fs/ext4/
Dinode.c53 static __u32 ext4_inode_csum(struct inode *inode, struct ext4_inode *raw, in ext4_inode_csum() argument
56 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in ext4_inode_csum()
68 if (EXT4_INODE_SIZE(inode->i_sb) > EXT4_GOOD_OLD_INODE_SIZE) { in ext4_inode_csum()
79 EXT4_INODE_SIZE(inode->i_sb) - offset); in ext4_inode_csum()
85 static int ext4_inode_csum_verify(struct inode *inode, struct ext4_inode *raw, in ext4_inode_csum_verify() argument
90 if (EXT4_SB(inode->i_sb)->s_es->s_creator_os != in ext4_inode_csum_verify()
92 !ext4_has_metadata_csum(inode->i_sb)) in ext4_inode_csum_verify()
96 calculated = ext4_inode_csum(inode, raw, ei); in ext4_inode_csum_verify()
97 if (EXT4_INODE_SIZE(inode->i_sb) > EXT4_GOOD_OLD_INODE_SIZE && in ext4_inode_csum_verify()
106 void ext4_inode_csum_set(struct inode *inode, struct ext4_inode *raw, in ext4_inode_csum_set() argument
[all …]
Dinline.c23 static int ext4_get_inline_size(struct inode *inode) in ext4_get_inline_size() argument
25 if (EXT4_I(inode)->i_inline_off) in ext4_get_inline_size()
26 return EXT4_I(inode)->i_inline_size; in ext4_get_inline_size()
31 static int get_max_inline_xattr_value_size(struct inode *inode, in get_max_inline_xattr_value_size() argument
40 if (!EXT4_INODE_HAS_XATTR_SPACE(inode)) in get_max_inline_xattr_value_size()
43 min_offs = EXT4_SB(inode->i_sb)->s_inode_size - in get_max_inline_xattr_value_size()
45 EXT4_I(inode)->i_extra_isize - in get_max_inline_xattr_value_size()
53 if (!ext4_test_inode_state(inode, EXT4_STATE_XATTR)) in get_max_inline_xattr_value_size()
59 header = IHDR(inode, raw_inode); in get_max_inline_xattr_value_size()
61 end = (void *)raw_inode + EXT4_SB(inode->i_sb)->s_inode_size; in get_max_inline_xattr_value_size()
[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()
73 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/hfsplus/
Dinode.c38 struct inode *inode = mapping->host; in hfsplus_write_failed() local
40 if (to > inode->i_size) { in hfsplus_write_failed()
41 truncate_pagecache(inode, inode->i_size); in hfsplus_write_failed()
42 hfsplus_file_truncate(inode); in hfsplus_write_failed()
69 struct inode *inode = page->mapping->host; in hfsplus_releasepage() local
70 struct super_block *sb = inode->i_sb; in hfsplus_releasepage()
76 switch (inode->i_ino) { in hfsplus_releasepage()
131 struct inode *inode = mapping->host; in hfsplus_direct_IO() local
135 ret = blockdev_direct_IO(iocb, inode, iter, hfsplus_get_block); in hfsplus_direct_IO()
142 loff_t isize = i_size_read(inode); in hfsplus_direct_IO()
[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/cifs/
Dfscache.h57 extern void cifs_fscache_release_inode_cookie(struct inode *);
58 extern void cifs_fscache_update_inode_cookie(struct inode *inode);
59 extern void cifs_fscache_set_inode_cookie(struct inode *, struct file *);
60 extern void cifs_fscache_reset_inode_cookie(struct inode *);
62 extern void __cifs_fscache_invalidate_page(struct page *, struct inode *);
63 extern void __cifs_fscache_wait_on_page_write(struct inode *inode, struct page *page);
64 extern void __cifs_fscache_uncache_page(struct inode *inode, struct page *page);
66 extern int __cifs_readpage_from_fscache(struct inode *, struct page *);
67 extern int __cifs_readpages_from_fscache(struct inode *,
71 extern void __cifs_fscache_readpages_cancel(struct inode *, struct list_head *);
[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()
88 adfs_atts2mode(struct super_block *sb, struct inode *inode) in adfs_atts2mode() argument
90 unsigned int attr = ADFS_I(inode)->attr; in adfs_atts2mode()
99 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 …]
/fs/udf/
Dinode.c56 static int udf_update_inode(struct inode *, int);
57 static int udf_sync_inode(struct inode *inode);
58 static int udf_alloc_i_data(struct inode *inode, size_t size);
59 static sector_t inode_getblk(struct inode *, sector_t, int *, int *);
60 static int udf_insert_aext(struct inode *, struct extent_position,
62 static void udf_split_extents(struct inode *, int *, int, udf_pblk_t,
64 static void udf_prealloc_extents(struct inode *, int, int,
66 static void udf_merge_extents(struct inode *, struct kernel_long_ad *, int *);
67 static int udf_update_extents(struct inode *, struct kernel_long_ad *, int,
69 static int udf_get_block(struct inode *, sector_t, struct buffer_head *, int);
[all …]

12345678910>>...41