/linux-6.1.9/fs/ |
D | inode.c | 143 static int no_open(struct inode *inode, struct file *file) in no_open() argument 156 int inode_init_always(struct super_block *sb, struct inode *inode) in inode_init_always() argument 160 struct address_space *const mapping = &inode->i_data; in inode_init_always() 162 inode->i_sb = sb; in inode_init_always() 163 inode->i_blkbits = sb->s_blocksize_bits; in inode_init_always() 164 inode->i_flags = 0; in inode_init_always() 165 atomic64_set(&inode->i_sequence, 0); in inode_init_always() 166 atomic_set(&inode->i_count, 1); in inode_init_always() 167 inode->i_op = &empty_iops; in inode_init_always() 168 inode->i_fop = &no_open_fops; in inode_init_always() [all …]
|
/linux-6.1.9/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 …]
|
/linux-6.1.9/fs/f2fs/ |
D | inode.c | 25 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 …]
|
/linux-6.1.9/include/linux/ |
D | quotaops.h | 24 struct inode *inode, struct iattr *ia) in is_quota_modification() argument 27 i_uid_needs_update(mnt_userns, ia, inode) || in is_quota_modification() 28 i_gid_needs_update(mnt_userns, ia, inode)); in is_quota_modification() 43 int dquot_initialize(struct inode *inode); 44 bool dquot_initialize_needed(struct inode *inode); 45 void dquot_drop(struct inode *inode); 72 int __dquot_alloc_space(struct inode *inode, qsize_t number, int flags); 73 void __dquot_free_space(struct inode *inode, qsize_t number, int flags); 75 int dquot_alloc_inode(struct inode *inode); 77 int dquot_claim_space_nodirty(struct inode *inode, qsize_t number); [all …]
|
D | fscrypt.h | 95 int (*get_context)(struct inode *inode, void *ctx, size_t len); 113 int (*set_context)(struct inode *inode, const void *ctx, size_t len, 130 bool (*empty_dir)(struct inode *inode); 181 static inline struct fscrypt_info *fscrypt_get_info(const struct inode *inode) in fscrypt_get_info() argument 189 return smp_load_acquire(&inode->i_crypt_info); in fscrypt_get_info() 203 static inline bool fscrypt_needs_contents_encryption(const struct inode *inode) in fscrypt_needs_contents_encryption() argument 205 return IS_ENCRYPTED(inode) && S_ISREG(inode->i_mode); in fscrypt_needs_contents_encryption() 256 int fscrypt_encrypt_block_inplace(const struct inode *inode, struct page *page, 262 int fscrypt_decrypt_block_inplace(const struct inode *inode, struct page *page, 283 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 126 u64 cur = inode_peek_iversion_raw(inode); in inode_set_max_iversion_raw() 131 } while (!atomic64_try_cmpxchg(&inode->i_version, &cur, val)); in inode_set_max_iversion_raw() 147 inode_set_iversion(struct inode *inode, u64 val) in inode_set_iversion() argument 149 inode_set_iversion_raw(inode, val << I_VERSION_QUERIED_SHIFT); in inode_set_iversion() 169 inode_set_iversion_queried(struct inode *inode, u64 val) in inode_set_iversion_queried() argument [all …]
|
/linux-6.1.9/fs/nfs/ |
D | inode.c | 65 static int nfs_update_inode(struct inode *, struct nfs_fattr *); 107 int nfs_drop_inode(struct inode *inode) in nfs_drop_inode() argument 109 return NFS_STALE(inode) || generic_drop_inode(inode); in nfs_drop_inode() 113 void nfs_clear_inode(struct inode *inode) in nfs_clear_inode() argument 118 WARN_ON_ONCE(nfs_have_writebacks(inode)); in nfs_clear_inode() 119 WARN_ON_ONCE(!list_empty(&NFS_I(inode)->open_files)); in nfs_clear_inode() 120 nfs_zap_acl_cache(inode); in nfs_clear_inode() 121 nfs_access_zap_cache(inode); in nfs_clear_inode() 122 nfs_fscache_clear_inode(inode); in nfs_clear_inode() 126 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 …]
|
/linux-6.1.9/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 …]
|
/linux-6.1.9/fs/nilfs2/ |
D | inode.c | 44 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 …]
|
D | mdt.h | 26 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 …]
|
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 …]
|
/linux-6.1.9/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() 74 struct inode *inode = folio->mapping->host; in hfs_release_folio() local 75 struct super_block *sb = inode->i_sb; in hfs_release_folio() 82 switch (inode->i_ino) { in hfs_release_folio() 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 …]
|
/linux-6.1.9/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 …]
|
/linux-6.1.9/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() 73 struct inode * dir, struct dentry * dentry, umode_t mode, in ufs_create() [all …]
|
/linux-6.1.9/fs/hfsplus/ |
D | inode.c | 38 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() 68 struct inode *inode = folio->mapping->host; in hfsplus_release_folio() local 69 struct super_block *sb = inode->i_sb; in hfsplus_release_folio() 76 switch (inode->i_ino) { in hfsplus_release_folio() 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 …]
|
/linux-6.1.9/fs/cifs/ |
D | fscache.h | 44 extern void cifs_fscache_get_inode_cookie(struct inode *inode); 45 extern void cifs_fscache_release_inode_cookie(struct inode *); 46 extern void cifs_fscache_unuse_inode_cookie(struct inode *inode, bool update); 49 void cifs_fscache_fill_coherency(struct inode *inode, in cifs_fscache_fill_coherency() argument 52 struct cifsInodeInfo *cifsi = CIFS_I(inode); in cifs_fscache_fill_coherency() 55 cd->last_write_time_sec = cpu_to_le64(cifsi->netfs.inode.i_mtime.tv_sec); in cifs_fscache_fill_coherency() 56 cd->last_write_time_nsec = cpu_to_le32(cifsi->netfs.inode.i_mtime.tv_nsec); in cifs_fscache_fill_coherency() 57 cd->last_change_time_sec = cpu_to_le64(cifsi->netfs.inode.i_ctime.tv_sec); in cifs_fscache_fill_coherency() 58 cd->last_change_time_nsec = cpu_to_le32(cifsi->netfs.inode.i_ctime.tv_nsec); in cifs_fscache_fill_coherency() 62 static inline struct fscache_cookie *cifs_inode_cookie(struct inode *inode) in cifs_inode_cookie() argument [all …]
|
/linux-6.1.9/fs/ocfs2/ |
D | inode.c | 55 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 …]
|
/linux-6.1.9/fs/ext2/ |
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 …]
|
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 …]
|
/linux-6.1.9/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() 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_filetype(ADFS_I(inode)->loadaddr)) { in adfs_atts2mode() [all …]
|
/linux-6.1.9/fs/ext4/ |
D | inode.c | 52 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 …]
|
/linux-6.1.9/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 …]
|
/linux-6.1.9/fs/sysv/ |
D | namei.c | 19 static int add_nondir(struct dentry *dentry, struct inode *inode) in add_nondir() argument 21 int err = sysv_add_link(dentry, inode); in add_nondir() 23 d_instantiate(dentry, inode); in add_nondir() 26 inode_dec_link_count(inode); in add_nondir() 27 iput(inode); in add_nondir() 31 static struct dentry *sysv_lookup(struct inode * dir, struct dentry * dentry, unsigned int flags) in sysv_lookup() 33 struct inode * inode = NULL; in sysv_lookup() local 40 inode = sysv_iget(dir->i_sb, ino); in sysv_lookup() 41 return d_splice_alias(inode, dentry); in sysv_lookup() 44 static int sysv_mknod(struct user_namespace *mnt_userns, struct inode *dir, in sysv_mknod() [all …]
|
/linux-6.1.9/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 …]
|