Home
last modified time | relevance | path

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

12345678910>>...72

/linux/fs/
H A Dinode.c143 static int no_open(struct inode *inode, struct file *file) in no_open() argument
158 int inode_init_always_gfp(struct super_block *sb, struct inode *inode, gfp_t gfp) in inode_init_always_gfp() argument
162 struct address_space *const mapping = &inode->i_data; in inode_init_always_gfp()
164 inode->i_sb = sb; in inode_init_always_gfp()
165 inode->i_blkbits = sb->s_blocksize_bits; in inode_init_always_gfp()
166 inode->i_flags = 0; in inode_init_always_gfp()
167 inode->i_state = 0; in inode_init_always_gfp()
168 atomic64_set(&inode->i_sequence, 0); in inode_init_always_gfp()
169 atomic_set(&inode->i_count, 1); in inode_init_always_gfp()
170 inode->i_op = &empty_iops; in inode_init_always_gfp()
[all …]
/linux/fs/affs/
H A 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 …]
/linux/fs/f2fs/
H A Dinode.c26 void f2fs_mark_inode_dirty_sync(struct inode *inode, bool sync) in f2fs_mark_inode_dirty_sync() argument
28 if (is_inode_flag_set(inode, FI_NEW_INODE)) in f2fs_mark_inode_dirty_sync()
31 if (f2fs_readonly(F2FS_I_SB(inode)->sb)) in f2fs_mark_inode_dirty_sync()
34 if (f2fs_inode_dirtied(inode, sync)) in f2fs_mark_inode_dirty_sync()
37 if (f2fs_is_atomic_file(inode)) { in f2fs_mark_inode_dirty_sync()
38 set_inode_flag(inode, FI_ATOMIC_DIRTIED); in f2fs_mark_inode_dirty_sync()
42 mark_inode_dirty_sync(inode); in f2fs_mark_inode_dirty_sync()
45 void f2fs_set_inode_flags(struct inode *inode) in f2fs_set_inode_flags() argument
47 unsigned int flags = F2FS_I(inode)->i_flags; in f2fs_set_inode_flags()
60 if (file_is_encrypt(inode)) in f2fs_set_inode_flags()
[all …]
/linux/include/linux/
H A Dquotaops.h24 struct inode *inode, struct iattr *ia) in is_quota_modification() argument
27 i_uid_needs_update(idmap, ia, inode) || in is_quota_modification()
28 i_gid_needs_update(idmap, 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 void dquot_claim_space_nodirty(struct inode *inode, qsize_t number);
[all …]
H A Dfs.h94 typedef int (get_block_t)(struct inode *inode, sector_t iblock,
466 struct inode *host;
595 #define i_size_ordered_init(inode) seqcount_init(&inode->i_size_seqcount) argument
597 #define i_size_ordered_init(inode) do { } while (0) argument
632 struct inode { struct
719 void (*free_inode)(struct inode *); argument
753 #define inode_state_wait_address(inode, bit) ((char *)&(inode)->i_state + (bit)) argument
756 struct inode *inode, u32 bit);
758 static inline void inode_wake_up_bit(struct inode *inode, u32 bit) in inode_wake_up_bit() argument
761 wake_up_var(inode_state_wait_address(inode, bit)); in inode_wake_up_bit()
[all …]
H A Dfscrypt.h124 int (*get_context)(struct inode *inode, void *ctx, size_t len);
142 int (*set_context)(struct inode *inode, const void *ctx, size_t len,
159 bool (*empty_dir)(struct inode *inode);
198 fscrypt_get_inode_info(const struct inode *inode) in fscrypt_get_inode_info() argument
206 return smp_load_acquire(&inode->i_crypt_info); in fscrypt_get_inode_info()
220 static inline bool fscrypt_needs_contents_encryption(const struct inode *inode) in fscrypt_needs_contents_encryption() argument
222 return IS_ENCRYPTED(inode) && S_ISREG(inode->i_mode); in fscrypt_needs_contents_encryption()
316 int fscrypt_encrypt_block_inplace(const struct inode *inode, struct page *page,
322 int fscrypt_decrypt_block_inplace(const struct inode *inode, struct page *page,
353 int fscrypt_has_permitted_context(struct inode *parent, struct inode *child);
[all …]
H A Diversion.h111 inode_set_iversion_raw(struct inode *inode, u64 val) in inode_set_iversion_raw() argument
113 atomic64_set(&inode->i_version, val); in inode_set_iversion_raw()
128 inode_peek_iversion_raw(const struct inode *inode) in inode_peek_iversion_raw() argument
130 return atomic64_read(&inode->i_version); in inode_peek_iversion_raw()
142 inode_set_max_iversion_raw(struct inode *inode, u64 val) in inode_set_max_iversion_raw() argument
144 u64 cur = inode_peek_iversion_raw(inode); in inode_set_max_iversion_raw()
149 } while (!atomic64_try_cmpxchg(&inode->i_version, &cur, val)); in inode_set_max_iversion_raw()
165 inode_set_iversion(struct inode *inode, u64 val) in inode_set_iversion() argument
167 inode_set_iversion_raw(inode, val << I_VERSION_QUERIED_SHIFT); in inode_set_iversion()
187 inode_set_iversion_queried(struct inode *inode, u64 val) in inode_set_iversion_queried() argument
[all …]
/linux/fs/nfs/
H A Dinode.c65 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 …]
H A Ddelegation.h19 struct inode *inode; member
44 int nfs_inode_set_delegation(struct inode *inode, const struct cred *cred,
47 void nfs_inode_reclaim_delegation(struct inode *inode, const struct cred *cred,
50 int nfs4_inode_return_delegation(struct inode *inode);
51 void nfs4_inode_return_delegation_on_close(struct inode *inode);
52 int nfs_async_inode_return_delegation(struct inode *inode, const nfs4_stateid *stateid);
53 void nfs_inode_evict_delegation(struct inode *inode);
55 struct inode *nfs_delegation_find_inode(struct nfs_client *clp, const struct nfs_fh *fhandle);
62 void nfs_remove_bad_delegation(struct inode *inode, const nfs4_stateid *stateid);
63 void nfs_delegation_mark_returned(struct inode *inode, const nfs4_stateid *stateid);
[all …]
/linux/fs/hfs/
H A Dinode.c39 struct inode *inode = mapping->host; in hfs_write_failed() local
41 if (to > inode->i_size) { in hfs_write_failed()
42 truncate_pagecache(inode, inode->i_size); in hfs_write_failed()
43 hfs_file_truncate(inode); in hfs_write_failed()
68 struct inode *inode = folio->mapping->host; in hfs_release_folio() local
69 struct super_block *sb = inode->i_sb; in hfs_release_folio()
76 switch (inode->i_ino) { in hfs_release_folio()
128 struct inode *inode = mapping->host; in hfs_direct_IO() local
132 ret = blockdev_direct_IO(iocb, inode, iter, hfs_get_block); in hfs_direct_IO()
139 loff_t isize = i_size_read(inode); in hfs_direct_IO()
[all …]
/linux/fs/ext4/
H A Dinode.c53 struct inode *inode,
57 static __u32 ext4_inode_csum(struct inode *inode, struct ext4_inode *raw, in ext4_inode_csum() argument
60 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in ext4_inode_csum()
72 if (EXT4_INODE_SIZE(inode->i_sb) > EXT4_GOOD_OLD_INODE_SIZE) { in ext4_inode_csum()
83 EXT4_INODE_SIZE(inode->i_sb) - offset); in ext4_inode_csum()
89 static int ext4_inode_csum_verify(struct inode *inode, struct ext4_inode *raw, in ext4_inode_csum_verify() argument
94 if (EXT4_SB(inode->i_sb)->s_es->s_creator_os != in ext4_inode_csum_verify()
96 !ext4_has_metadata_csum(inode->i_sb)) in ext4_inode_csum_verify()
100 calculated = ext4_inode_csum(inode, raw, ei); in ext4_inode_csum_verify()
101 if (EXT4_INODE_SIZE(inode->i_sb) > EXT4_GOOD_OLD_INODE_SIZE && in ext4_inode_csum_verify()
[all …]
/linux/fs/coda/
H A 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 …]
/linux/fs/nilfs2/
H A Dinode.c41 static int nilfs_iget_test(struct inode *inode, void *opaque);
43 void nilfs_inode_add_blocks(struct inode *inode, int n) in nilfs_inode_add_blocks() argument
45 struct nilfs_root *root = NILFS_I(inode)->i_root; in nilfs_inode_add_blocks()
47 inode_add_bytes(inode, i_blocksize(inode) * n); in nilfs_inode_add_blocks()
52 void nilfs_inode_sub_blocks(struct inode *inode, int n) in nilfs_inode_sub_blocks() argument
54 struct nilfs_root *root = NILFS_I(inode)->i_root; in nilfs_inode_sub_blocks()
56 inode_sub_bytes(inode, i_blocksize(inode) * n); in nilfs_inode_sub_blocks()
72 int nilfs_get_block(struct inode *inode, sector_t blkoff, in nilfs_get_block() argument
75 struct nilfs_inode_info *ii = NILFS_I(inode); in nilfs_get_block()
76 struct the_nilfs *nilfs = inode->i_sb->s_fs_info; in nilfs_get_block()
[all …]
H A 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 …]
H A 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 …]
/linux/fs/reiserfs/
H A 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 …]
/linux/fs/ufs/
H A 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 …]
/linux/fs/hfsplus/
H A Dinode.c33 struct inode *inode = mapping->host; in hfsplus_write_failed() local
35 if (to > inode->i_size) { in hfsplus_write_failed()
36 truncate_pagecache(inode, inode->i_size); in hfsplus_write_failed()
37 hfsplus_file_truncate(inode); in hfsplus_write_failed()
62 struct inode *inode = folio->mapping->host; in hfsplus_release_folio() local
63 struct super_block *sb = inode->i_sb; in hfsplus_release_folio()
70 switch (inode->i_ino) { in hfsplus_release_folio()
125 struct inode *inode = mapping->host; in hfsplus_direct_IO() local
129 ret = blockdev_direct_IO(iocb, inode, iter, hfsplus_get_block); in hfsplus_direct_IO()
136 loff_t isize = i_size_read(inode); in hfsplus_direct_IO()
[all …]
/linux/fs/ext2/
H A 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 …]
H A 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 …]
/linux/fs/btrfs/
H A Dbtrfs_inode.h340 struct inode vfs_inode;
343 static inline u64 btrfs_get_first_dir_index_to_log(const struct btrfs_inode *inode) in btrfs_get_first_dir_index_to_log() argument
345 return READ_ONCE(inode->first_dir_index_to_log); in btrfs_get_first_dir_index_to_log()
348 static inline void btrfs_set_first_dir_index_to_log(struct btrfs_inode *inode, in btrfs_set_first_dir_index_to_log() argument
351 WRITE_ONCE(inode->first_dir_index_to_log, index); in btrfs_set_first_dir_index_to_log()
357 struct inode *: container_of(_inode, struct btrfs_inode, vfs_inode), \
358 const struct inode *: (const struct btrfs_inode *)container_of( \
379 static inline u64 btrfs_ino(const struct btrfs_inode *inode) in btrfs_ino() argument
381 u64 ino = inode->objectid; in btrfs_ino()
383 if (test_bit(BTRFS_INODE_ROOT_STUB, &inode->runtime_flags)) in btrfs_ino()
[all …]
/linux/fs/adfs/
H A Dinode.c17 adfs_get_block(struct inode *inode, sector_t block, struct buffer_head *bh, in adfs_get_block() argument
21 if (block >= inode->i_blocks) in adfs_get_block()
24 block = __adfs_block_map(inode->i_sb, ADFS_I(inode)->indaddr, in adfs_get_block()
27 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()
91 adfs_atts2mode(struct super_block *sb, struct inode *inode) in adfs_atts2mode() argument
93 unsigned int attr = ADFS_I(inode)->attr; in adfs_atts2mode()
102 switch (adfs_filetype(ADFS_I(inode)->loadaddr)) { in adfs_atts2mode()
[all …]
/linux/fs/squashfs/
H A Dinode.c44 static int squashfs_new_inode(struct super_block *sb, struct inode *inode, in squashfs_new_inode() argument
51 inode->i_ino = le32_to_cpu(sqsh_ino->inode_number); in squashfs_new_inode()
52 if (inode->i_ino == 0) in squashfs_new_inode()
63 i_uid_write(inode, i_uid); in squashfs_new_inode()
64 i_gid_write(inode, i_gid); in squashfs_new_inode()
65 inode_set_mtime(inode, le32_to_cpu(sqsh_ino->mtime), 0); in squashfs_new_inode()
66 inode_set_atime(inode, inode_get_mtime_sec(inode), 0); in squashfs_new_inode()
67 inode_set_ctime(inode, inode_get_mtime_sec(inode), 0); in squashfs_new_inode()
68 inode->i_mode = le16_to_cpu(sqsh_ino->mode); in squashfs_new_inode()
69 inode->i_size = 0; in squashfs_new_inode()
[all …]
/linux/fs/minix/
H A Dnamei.c10 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 mnt_idmap *idmap, struct inode *dir, in minix_mknod()
[all …]
/linux/fs/fat/
H A 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>>...72