/kernel/linux/linux-5.10/fs/ |
D | inode.c | 119 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 …]
|
/kernel/linux/linux-5.10/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 …]
|
/kernel/linux/linux-5.10/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 …]
|
/kernel/linux/linux-5.10/fs/hfs/ |
D | inode.c | 44 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 …]
|
/kernel/linux/linux-5.10/include/linux/ |
D | quotaops.h | 23 static inline bool is_quota_modification(struct inode *inode, struct iattr *ia) in is_quota_modification() argument 26 (ia->ia_valid & ATTR_UID && !uid_eq(ia->ia_uid, inode->i_uid)) || in is_quota_modification() 27 (ia->ia_valid & ATTR_GID && !gid_eq(ia->ia_gid, inode->i_gid)); in is_quota_modification() 42 int dquot_initialize(struct inode *inode); 43 bool dquot_initialize_needed(struct inode *inode); 44 void dquot_drop(struct inode *inode); 71 int __dquot_alloc_space(struct inode *inode, qsize_t number, int flags); 72 void __dquot_free_space(struct inode *inode, qsize_t number, int flags); 74 int dquot_alloc_inode(struct inode *inode); 76 int dquot_claim_space_nodirty(struct inode *inode, qsize_t number); [all …]
|
D | fscrypt.h | 61 int (*get_context)(struct inode *inode, void *ctx, size_t len); 62 int (*set_context)(struct inode *inode, const void *ctx, size_t len, 65 bool (*empty_dir)(struct inode *inode); 75 static inline struct fscrypt_info *fscrypt_get_info(const struct inode *inode) in fscrypt_get_info() argument 83 return smp_load_acquire(&inode->i_crypt_info); in fscrypt_get_info() 97 static inline bool fscrypt_needs_contents_encryption(const struct inode *inode) in fscrypt_needs_contents_encryption() argument 99 return IS_ENCRYPTED(inode) && S_ISREG(inode->i_mode); in fscrypt_needs_contents_encryption() 150 int fscrypt_encrypt_block_inplace(const struct inode *inode, struct page *page, 156 int fscrypt_decrypt_block_inplace(const struct inode *inode, struct page *page, 177 int fscrypt_has_permitted_context(struct inode *parent, struct inode *child); [all …]
|
D | iversion.h | 93 inode_set_iversion_raw(struct inode *inode, u64 val) in inode_set_iversion_raw() argument 95 atomic64_set(&inode->i_version, val); in inode_set_iversion_raw() 110 inode_peek_iversion_raw(const struct inode *inode) in inode_peek_iversion_raw() argument 112 return atomic64_read(&inode->i_version); in inode_peek_iversion_raw() 124 inode_set_max_iversion_raw(struct inode *inode, u64 val) in inode_set_max_iversion_raw() argument 128 cur = inode_peek_iversion_raw(inode); in inode_set_max_iversion_raw() 132 old = atomic64_cmpxchg(&inode->i_version, cur, val); in inode_set_max_iversion_raw() 152 inode_set_iversion(struct inode *inode, u64 val) in inode_set_iversion() argument 154 inode_set_iversion_raw(inode, val << I_VERSION_QUERIED_SHIFT); in inode_set_iversion() 174 inode_set_iversion_queried(struct inode *inode, u64 val) in inode_set_iversion_queried() argument [all …]
|
/kernel/linux/linux-5.10/fs/nfs/ |
D | inode.c | 65 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 …]
|
D | io.c | 18 static void nfs_block_o_direct(struct nfs_inode *nfsi, struct inode *inode) in nfs_block_o_direct() argument 22 inode_dio_wait(inode); in nfs_block_o_direct() 43 nfs_start_io_read(struct inode *inode) in nfs_start_io_read() argument 45 struct nfs_inode *nfsi = NFS_I(inode); in nfs_start_io_read() 47 down_read(&inode->i_rwsem); in nfs_start_io_read() 50 up_read(&inode->i_rwsem); in nfs_start_io_read() 52 down_write(&inode->i_rwsem); in nfs_start_io_read() 53 nfs_block_o_direct(nfsi, inode); in nfs_start_io_read() 54 downgrade_write(&inode->i_rwsem); in nfs_start_io_read() 65 nfs_end_io_read(struct inode *inode) in nfs_end_io_read() argument [all …]
|
/kernel/linux/linux-5.10/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 …]
|
/kernel/linux/linux-5.10/fs/nilfs2/ |
D | inode.c | 40 static int nilfs_iget_test(struct inode *inode, void *opaque); 42 void nilfs_inode_add_blocks(struct inode *inode, int n) in nilfs_inode_add_blocks() argument 44 struct nilfs_root *root = NILFS_I(inode)->i_root; in nilfs_inode_add_blocks() 46 inode_add_bytes(inode, i_blocksize(inode) * n); in nilfs_inode_add_blocks() 51 void nilfs_inode_sub_blocks(struct inode *inode, int n) in nilfs_inode_sub_blocks() argument 53 struct nilfs_root *root = NILFS_I(inode)->i_root; in nilfs_inode_sub_blocks() 55 inode_sub_bytes(inode, i_blocksize(inode) * n); in nilfs_inode_sub_blocks() 71 int nilfs_get_block(struct inode *inode, sector_t blkoff, in nilfs_get_block() argument 74 struct nilfs_inode_info *ii = NILFS_I(inode); in nilfs_get_block() 75 struct the_nilfs *nilfs = inode->i_sb->s_fs_info; in nilfs_get_block() [all …]
|
D | mdt.h | 56 static inline struct nilfs_mdt_info *NILFS_MDT(const struct inode *inode) in NILFS_MDT() argument 58 return inode->i_private; in NILFS_MDT() 61 static inline int nilfs_is_metadata_file_inode(const struct inode *inode) in nilfs_is_metadata_file_inode() argument 63 return inode->i_private != NULL; in nilfs_is_metadata_file_inode() 69 int nilfs_mdt_get_block(struct inode *, unsigned long, int, 70 void (*init_block)(struct inode *, 73 int nilfs_mdt_find_block(struct inode *inode, unsigned long start, 76 int nilfs_mdt_delete_block(struct inode *, unsigned long); 77 int nilfs_mdt_forget_block(struct inode *, unsigned long); 78 int nilfs_mdt_fetch_dirty(struct inode *); [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 …]
|
/kernel/linux/linux-5.10/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 …]
|
/kernel/linux/linux-5.10/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 …]
|
/kernel/linux/linux-5.10/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 …]
|
/kernel/linux/linux-5.10/fs/9p/ |
D | cache.h | 21 extern void v9fs_cache_inode_get_cookie(struct inode *inode); 22 extern void v9fs_cache_inode_put_cookie(struct inode *inode); 23 extern void v9fs_cache_inode_flush_cookie(struct inode *inode); 24 extern void v9fs_cache_inode_set_cookie(struct inode *inode, struct file *filp); 25 extern void v9fs_cache_inode_reset_cookie(struct inode *inode); 32 extern int __v9fs_readpage_from_fscache(struct inode *inode, 34 extern int __v9fs_readpages_from_fscache(struct inode *inode, 38 extern void __v9fs_readpage_to_fscache(struct inode *inode, struct page *page); 39 extern void __v9fs_fscache_wait_on_page_write(struct inode *inode, 53 static inline int v9fs_readpage_from_fscache(struct inode *inode, in v9fs_readpage_from_fscache() argument [all …]
|
/kernel/linux/linux-5.10/fs/ext4/ |
D | inode.c | 51 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 void ext4_inode_csum_set(struct inode *inode, struct ext4_inode *raw, in ext4_inode_csum_set() argument [all …]
|
/kernel/linux/linux-5.10/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 …]
|
/kernel/linux/linux-5.10/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 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 …]
|
/kernel/linux/linux-5.10/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, 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 …]
|
/kernel/linux/linux-5.10/fs/minix/ |
D | namei.c | 10 static int add_nondir(struct dentry *dentry, struct inode *inode) in add_nondir() argument 12 int err = minix_add_link(dentry, inode); in add_nondir() 14 d_instantiate(dentry, inode); in add_nondir() 17 inode_dec_link_count(inode); in add_nondir() 18 iput(inode); in add_nondir() 22 static struct dentry *minix_lookup(struct inode * dir, struct dentry *dentry, unsigned int flags) in minix_lookup() 24 struct inode * inode = NULL; in minix_lookup() local 32 inode = minix_iget(dir->i_sb, ino); in minix_lookup() 33 return d_splice_alias(inode, dentry); in minix_lookup() 36 static int minix_mknod(struct inode * dir, struct dentry *dentry, umode_t mode, dev_t rdev) in minix_mknod() [all …]
|
/kernel/linux/linux-5.10/fs/ceph/ |
D | io.c | 22 static void ceph_block_o_direct(struct ceph_inode_info *ci, struct inode *inode) in ceph_block_o_direct() argument 24 lockdep_assert_held_write(&inode->i_rwsem); in ceph_block_o_direct() 30 inode_dio_wait(inode); in ceph_block_o_direct() 51 ceph_start_io_read(struct inode *inode) in ceph_start_io_read() argument 53 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_start_io_read() 56 down_read(&inode->i_rwsem); in ceph_start_io_read() 59 up_read(&inode->i_rwsem); in ceph_start_io_read() 61 down_write(&inode->i_rwsem); in ceph_start_io_read() 62 ceph_block_o_direct(ci, inode); in ceph_start_io_read() 63 downgrade_write(&inode->i_rwsem); in ceph_start_io_read() [all …]
|
D | cache.h | 22 void ceph_fscache_register_inode_cookie(struct inode *inode); 24 void ceph_fscache_file_set_cookie(struct inode *inode, struct file *filp); 27 int ceph_readpage_from_fscache(struct inode *inode, struct page *page); 28 int ceph_readpages_from_fscache(struct inode *inode, 32 void ceph_readpage_to_fscache(struct inode *inode, struct page *page); 33 void ceph_invalidate_fscache_page(struct inode* inode, struct page *page); 41 static inline void ceph_fscache_invalidate(struct inode *inode) in ceph_fscache_invalidate() argument 43 fscache_invalidate(ceph_inode(inode)->fscache); in ceph_fscache_invalidate() 46 static inline void ceph_fscache_uncache_page(struct inode *inode, in ceph_fscache_uncache_page() argument 49 struct ceph_inode_info *ci = ceph_inode(inode); in ceph_fscache_uncache_page() [all …]
|
/kernel/linux/linux-5.10/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 …]
|