Home
last modified time | relevance | path

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

12345678910>>...29

/fs/
Dinode.c103 static void wake_up_inode(struct inode *inode) in wake_up_inode() argument
109 wake_up_bit(&inode->i_state, __I_LOCK); in wake_up_inode()
120 struct inode *inode_init_always(struct super_block *sb, struct inode *inode) in inode_init_always() argument
126 struct address_space * const mapping = &inode->i_data; in inode_init_always()
128 inode->i_sb = sb; in inode_init_always()
129 inode->i_blkbits = sb->s_blocksize_bits; in inode_init_always()
130 inode->i_flags = 0; in inode_init_always()
131 atomic_set(&inode->i_count, 1); in inode_init_always()
132 inode->i_op = &empty_iops; in inode_init_always()
133 inode->i_fop = &empty_fops; in inode_init_always()
[all …]
Dfs-writeback.c94 void __mark_inode_dirty(struct inode *inode, int flags) in __mark_inode_dirty() argument
96 struct super_block *sb = inode->i_sb; in __mark_inode_dirty()
104 sb->s_op->dirty_inode(inode); in __mark_inode_dirty()
114 if ((inode->i_state & flags) == flags) in __mark_inode_dirty()
121 if (!list_empty(&inode->i_dentry)) { in __mark_inode_dirty()
122 dentry = list_entry(inode->i_dentry.next, in __mark_inode_dirty()
128 if (inode->i_ino || strcmp(inode->i_sb->s_id, "bdev")) in __mark_inode_dirty()
131 current->comm, task_pid_nr(current), inode->i_ino, in __mark_inode_dirty()
132 name, inode->i_sb->s_id); in __mark_inode_dirty()
136 if ((inode->i_state & flags) != flags) { in __mark_inode_dirty()
[all …]
/fs/nfs/
Dinode.c57 static void nfs_invalidate_inode(struct inode *);
58 static int nfs_update_inode(struct inode *, struct nfs_fattr *);
87 int nfs_write_inode(struct inode *inode, int sync) in nfs_write_inode() argument
92 ret = filemap_fdatawait(inode->i_mapping); in nfs_write_inode()
94 ret = nfs_commit_inode(inode, FLUSH_SYNC); in nfs_write_inode()
96 ret = nfs_commit_inode(inode, 0); in nfs_write_inode()
99 __mark_inode_dirty(inode, I_DIRTY_DATASYNC); in nfs_write_inode()
103 void nfs_clear_inode(struct inode *inode) in nfs_clear_inode() argument
108 BUG_ON(nfs_have_writebacks(inode)); in nfs_clear_inode()
109 BUG_ON(!list_empty(&NFS_I(inode)->open_files)); in nfs_clear_inode()
[all …]
/fs/affs/
Dinode.c18 struct inode *affs_iget(struct super_block *sb, unsigned long ino) in affs_iget()
24 struct inode *inode; in affs_iget() local
30 inode = iget_locked(sb, ino); in affs_iget()
31 if (!inode) in affs_iget()
33 if (!(inode->i_state & I_NEW)) in affs_iget()
34 return inode; in affs_iget()
36 pr_debug("AFFS: affs_iget(%lu)\n", inode->i_ino); in affs_iget()
38 block = inode->i_ino; in affs_iget()
55 inode->i_size = 0; in affs_iget()
56 inode->i_nlink = 1; in affs_iget()
[all …]
Dfile.c21 static int affs_grow_extcache(struct inode *inode, u32 lc_idx);
22 static struct buffer_head *affs_alloc_extblock(struct inode *inode, struct buffer_head *bh, u32 ext…
23 static inline struct buffer_head *affs_get_extblock(struct inode *inode, u32 ext);
24 static struct buffer_head *affs_get_extblock_slow(struct inode *inode, u32 ext);
25 static int affs_file_open(struct inode *inode, struct file *filp);
26 static int affs_file_release(struct inode *inode, struct file *filp);
47 affs_file_open(struct inode *inode, struct file *filp) in affs_file_open() argument
50 inode->i_ino, atomic_read(&AFFS_I(inode)->i_opencnt)); in affs_file_open()
51 atomic_inc(&AFFS_I(inode)->i_opencnt); in affs_file_open()
56 affs_file_release(struct inode *inode, struct file *filp) in affs_file_release() argument
[all …]
/fs/hfsplus/
Dinode.c47 struct inode *inode = page->mapping->host; in hfsplus_releasepage() local
48 struct super_block *sb = inode->i_sb; in hfsplus_releasepage()
54 switch (inode->i_ino) { in hfsplus_releasepage()
107 struct inode *inode = file->f_path.dentry->d_inode->i_mapping->host; in hfsplus_direct_IO() local
109 return blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, iov, in hfsplus_direct_IO()
145 static struct dentry *hfsplus_file_lookup(struct inode *dir, struct dentry *dentry, in hfsplus_file_lookup()
150 struct inode *inode = NULL; in hfsplus_file_lookup() local
156 inode = HFSPLUS_I(dir).rsrc_inode; in hfsplus_file_lookup()
157 if (inode) in hfsplus_file_lookup()
160 inode = new_inode(sb); in hfsplus_file_lookup()
[all …]
Ddir.c20 struct inode *inode, u32 cnid) in hfsplus_instantiate() argument
23 d_instantiate(dentry, inode); in hfsplus_instantiate()
27 static struct dentry *hfsplus_lookup(struct inode *dir, struct dentry *dentry, in hfsplus_lookup()
30 struct inode *inode = NULL; in hfsplus_lookup() local
50 inode = NULL; in hfsplus_lookup()
100 inode = hfsplus_iget(dir->i_sb, cnid); in hfsplus_lookup()
101 if (IS_ERR(inode)) in hfsplus_lookup()
102 return ERR_CAST(inode); in hfsplus_lookup()
103 if (S_ISREG(inode->i_mode)) in hfsplus_lookup()
104 HFSPLUS_I(inode).dev = linkid; in hfsplus_lookup()
[all …]
Dextents.c86 static void __hfsplus_ext_write_extent(struct inode *inode, struct hfs_find_data *fd) in __hfsplus_ext_write_extent() argument
90 hfsplus_ext_build_key(fd->search_key, inode->i_ino, HFSPLUS_I(inode).cached_start, in __hfsplus_ext_write_extent()
91 HFSPLUS_IS_RSRC(inode) ? HFSPLUS_TYPE_RSRC : HFSPLUS_TYPE_DATA); in __hfsplus_ext_write_extent()
93 if (HFSPLUS_I(inode).flags & HFSPLUS_FLG_EXT_NEW) { in __hfsplus_ext_write_extent()
96 hfs_brec_insert(fd, HFSPLUS_I(inode).cached_extents, sizeof(hfsplus_extent_rec)); in __hfsplus_ext_write_extent()
97 HFSPLUS_I(inode).flags &= ~(HFSPLUS_FLG_EXT_DIRTY | HFSPLUS_FLG_EXT_NEW); in __hfsplus_ext_write_extent()
101 hfs_bnode_write(fd->bnode, HFSPLUS_I(inode).cached_extents, fd->entryoffset, fd->entrylength); in __hfsplus_ext_write_extent()
102 HFSPLUS_I(inode).flags &= ~HFSPLUS_FLG_EXT_DIRTY; in __hfsplus_ext_write_extent()
106 void hfsplus_ext_write_extent(struct inode *inode) in hfsplus_ext_write_extent() argument
108 if (HFSPLUS_I(inode).flags & HFSPLUS_FLG_EXT_DIRTY) { in hfsplus_ext_write_extent()
[all …]
/fs/hfs/
Dinode.c55 struct inode *inode = page->mapping->host; in hfs_releasepage() local
56 struct super_block *sb = inode->i_sb; in hfs_releasepage()
62 switch (inode->i_ino) { in hfs_releasepage()
110 struct inode *inode = file->f_path.dentry->d_inode->i_mapping->host; in hfs_direct_IO() local
112 return blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, iov, in hfs_direct_IO()
146 struct inode *hfs_new_inode(struct inode *dir, struct qstr *name, int mode) in hfs_new_inode()
149 struct inode *inode = new_inode(sb); in hfs_new_inode() local
150 if (!inode) in hfs_new_inode()
153 mutex_init(&HFS_I(inode)->extents_lock); in hfs_new_inode()
154 INIT_LIST_HEAD(&HFS_I(inode)->open_dir_list); in hfs_new_inode()
[all …]
Dextent.c110 static void __hfs_ext_write_extent(struct inode *inode, struct hfs_find_data *fd) in __hfs_ext_write_extent() argument
114 hfs_ext_build_key(fd->search_key, inode->i_ino, HFS_I(inode)->cached_start, in __hfs_ext_write_extent()
115 HFS_IS_RSRC(inode) ? HFS_FK_RSRC : HFS_FK_DATA); in __hfs_ext_write_extent()
117 if (HFS_I(inode)->flags & HFS_FLG_EXT_NEW) { in __hfs_ext_write_extent()
120 hfs_brec_insert(fd, HFS_I(inode)->cached_extents, sizeof(hfs_extent_rec)); in __hfs_ext_write_extent()
121 HFS_I(inode)->flags &= ~(HFS_FLG_EXT_DIRTY|HFS_FLG_EXT_NEW); in __hfs_ext_write_extent()
125 hfs_bnode_write(fd->bnode, HFS_I(inode)->cached_extents, fd->entryoffset, fd->entrylength); in __hfs_ext_write_extent()
126 HFS_I(inode)->flags &= ~HFS_FLG_EXT_DIRTY; in __hfs_ext_write_extent()
130 void hfs_ext_write_extent(struct inode *inode) in hfs_ext_write_extent() argument
134 if (HFS_I(inode)->flags & HFS_FLG_EXT_DIRTY) { in hfs_ext_write_extent()
[all …]
/fs/ocfs2/
Dinode.c68 static int ocfs2_read_locked_inode(struct inode *inode,
70 static int ocfs2_init_locked_inode(struct inode *inode, void *opaque);
71 static int ocfs2_find_actor(struct inode *inode, void *opaque);
73 struct inode *inode,
76 void ocfs2_set_inode_flags(struct inode *inode) in ocfs2_set_inode_flags() argument
78 unsigned int flags = OCFS2_I(inode)->ip_attr; in ocfs2_set_inode_flags()
80 inode->i_flags &= ~(S_IMMUTABLE | in ocfs2_set_inode_flags()
84 inode->i_flags |= S_IMMUTABLE; in ocfs2_set_inode_flags()
87 inode->i_flags |= S_SYNC; in ocfs2_set_inode_flags()
89 inode->i_flags |= S_APPEND; in ocfs2_set_inode_flags()
[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(dentry, inode); in ext2_add_nondir()
44 unlock_new_inode(inode); in ext2_add_nondir()
47 inode_dec_link_count(inode); in ext2_add_nondir()
48 unlock_new_inode(inode); in ext2_add_nondir()
49 iput(inode); in ext2_add_nondir()
57 static struct dentry *ext2_lookup(struct inode * dir, struct dentry *dentry, struct nameidata *nd) in ext2_lookup()
59 struct inode * inode; in ext2_lookup() local
66 inode = NULL; in ext2_lookup()
[all …]
Dinode.c44 static int ext2_update_inode(struct inode * inode, int do_sync);
49 static inline int ext2_inode_is_fast_symlink(struct inode *inode) in ext2_inode_is_fast_symlink() argument
51 int ea_blocks = EXT2_I(inode)->i_file_acl ? in ext2_inode_is_fast_symlink()
52 (inode->i_sb->s_blocksize >> 9) : 0; in ext2_inode_is_fast_symlink()
54 return (S_ISLNK(inode->i_mode) && in ext2_inode_is_fast_symlink()
55 inode->i_blocks - ea_blocks == 0); in ext2_inode_is_fast_symlink()
61 void ext2_delete_inode (struct inode * inode) in ext2_delete_inode() argument
63 truncate_inode_pages(&inode->i_data, 0); in ext2_delete_inode()
65 if (is_bad_inode(inode)) in ext2_delete_inode()
67 EXT2_I(inode)->i_dtime = get_seconds(); in ext2_delete_inode()
[all …]
/fs/reiserfs/
Dinode.c27 void reiserfs_delete_inode(struct inode *inode) in reiserfs_delete_inode() argument
32 2 * REISERFS_QUOTA_INIT_BLOCKS(inode->i_sb); in reiserfs_delete_inode()
36 truncate_inode_pages(&inode->i_data, 0); in reiserfs_delete_inode()
38 reiserfs_write_lock(inode->i_sb); in reiserfs_delete_inode()
41 …if (!(inode->i_state & I_NEW) && INODE_PKEY(inode)->k_objectid != 0) { /* also handles bad_inode c… in reiserfs_delete_inode()
42 reiserfs_delete_xattrs(inode); in reiserfs_delete_inode()
44 if (journal_begin(&th, inode->i_sb, jbegin_count)) in reiserfs_delete_inode()
46 reiserfs_update_inode_transaction(inode); in reiserfs_delete_inode()
48 reiserfs_discard_prealloc(&th, inode); in reiserfs_delete_inode()
50 err = reiserfs_delete_object(&th, inode); in reiserfs_delete_inode()
[all …]
/fs/coda/
Dcnode.c27 static void coda_fill_inode(struct inode *inode, struct coda_vattr *attr) in coda_fill_inode() argument
29 coda_vattr_to_iattr(inode, attr); in coda_fill_inode()
31 if (S_ISREG(inode->i_mode)) { in coda_fill_inode()
32 inode->i_op = &coda_file_inode_operations; in coda_fill_inode()
33 inode->i_fop = &coda_file_operations; in coda_fill_inode()
34 } else if (S_ISDIR(inode->i_mode)) { in coda_fill_inode()
35 inode->i_op = &coda_dir_inode_operations; in coda_fill_inode()
36 inode->i_fop = &coda_dir_operations; in coda_fill_inode()
37 } else if (S_ISLNK(inode->i_mode)) { in coda_fill_inode()
38 inode->i_op = &coda_symlink_inode_operations; in coda_fill_inode()
[all …]
/fs/adfs/
Dinode.c28 adfs_get_block(struct inode *inode, sector_t block, struct buffer_head *bh, in adfs_get_block() argument
35 if (block >= inode->i_blocks) in adfs_get_block()
38 block = __adfs_block_map(inode->i_sb, inode->i_ino, block); in adfs_get_block()
40 map_bh(bh, inode->i_sb, block); in adfs_get_block()
47 adfs_error(inode->i_sb, "block %d < 0", block); in adfs_get_block()
89 adfs_filetype(struct inode *inode) in adfs_filetype() argument
93 if (ADFS_I(inode)->stamped) in adfs_filetype()
94 type = (ADFS_I(inode)->loadaddr >> 8) & 0xfff; in adfs_filetype()
105 adfs_atts2mode(struct super_block *sb, struct inode *inode) in adfs_atts2mode() argument
107 unsigned int filetype, attr = ADFS_I(inode)->attr; in adfs_atts2mode()
[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(dentry, inode); in ufs_add_nondir()
45 inode_dec_link_count(inode); in ufs_add_nondir()
46 iput(inode); in ufs_add_nondir()
50 static struct dentry *ufs_lookup(struct inode * dir, struct dentry *dentry, struct nameidata *nd) in ufs_lookup()
52 struct inode * inode = NULL; in ufs_lookup() local
61 inode = ufs_iget(dir->i_sb, ino); in ufs_lookup()
62 if (IS_ERR(inode)) { in ufs_lookup()
64 return ERR_CAST(inode); in ufs_lookup()
[all …]
/fs/squashfs/
Dinode.c55 static int squashfs_new_inode(struct super_block *sb, struct inode *inode, in squashfs_new_inode() argument
60 err = squashfs_get_id(sb, le16_to_cpu(sqsh_ino->uid), &inode->i_uid); in squashfs_new_inode()
64 err = squashfs_get_id(sb, le16_to_cpu(sqsh_ino->guid), &inode->i_gid); in squashfs_new_inode()
68 inode->i_ino = le32_to_cpu(sqsh_ino->inode_number); in squashfs_new_inode()
69 inode->i_mtime.tv_sec = le32_to_cpu(sqsh_ino->mtime); in squashfs_new_inode()
70 inode->i_atime.tv_sec = inode->i_mtime.tv_sec; in squashfs_new_inode()
71 inode->i_ctime.tv_sec = inode->i_mtime.tv_sec; in squashfs_new_inode()
72 inode->i_mode = le16_to_cpu(sqsh_ino->mode); in squashfs_new_inode()
73 inode->i_size = 0; in squashfs_new_inode()
79 struct inode *squashfs_iget(struct super_block *sb, long long ino, in squashfs_iget()
[all …]
/fs/ext4/
Dinode.c47 static inline int ext4_begin_ordered_truncate(struct inode *inode, in ext4_begin_ordered_truncate() argument
51 EXT4_SB(inode->i_sb)->s_journal, in ext4_begin_ordered_truncate()
52 &EXT4_I(inode)->jinode, in ext4_begin_ordered_truncate()
61 static int ext4_inode_is_fast_symlink(struct inode *inode) in ext4_inode_is_fast_symlink() argument
63 int ea_blocks = EXT4_I(inode)->i_file_acl ? in ext4_inode_is_fast_symlink()
64 (inode->i_sb->s_blocksize >> 9) : 0; in ext4_inode_is_fast_symlink()
66 return (S_ISLNK(inode->i_mode) && inode->i_blocks - ea_blocks == 0); in ext4_inode_is_fast_symlink()
80 int ext4_forget(handle_t *handle, int is_metadata, struct inode *inode, in ext4_forget() argument
94 bh, is_metadata, inode->i_mode, in ext4_forget()
95 test_opt(inode->i_sb, DATA_FLAGS)); in ext4_forget()
[all …]
/fs/fat/
Dfile.c21 int fat_generic_ioctl(struct inode *inode, struct file *filp, in fat_generic_ioctl() argument
24 struct msdos_sb_info *sbi = MSDOS_SB(inode->i_sb); in fat_generic_ioctl()
32 mutex_lock(&inode->i_mutex); in fat_generic_ioctl()
33 attr = fat_make_attrs(inode); in fat_generic_ioctl()
34 mutex_unlock(&inode->i_mutex); in fat_generic_ioctl()
41 int err, is_dir = S_ISDIR(inode->i_mode); in fat_generic_ioctl()
48 mutex_lock(&inode->i_mutex); in fat_generic_ioctl()
62 attr |= (MSDOS_I(inode)->i_attrs & ATTR_VOLUME) | in fat_generic_ioctl()
64 oldattr = fat_make_attrs(inode); in fat_generic_ioctl()
68 ia.ia_ctime = current_fs_time(inode->i_sb); in fat_generic_ioctl()
[all …]
/fs/minix/
Dnamei.c9 static int add_nondir(struct dentry *dentry, struct inode *inode) in add_nondir() argument
11 int err = minix_add_link(dentry, inode); in add_nondir()
13 d_instantiate(dentry, inode); in add_nondir()
16 inode_dec_link_count(inode); in add_nondir()
17 iput(inode); in add_nondir()
21 static struct dentry *minix_lookup(struct inode * dir, struct dentry *dentry, struct nameidata *nd) in minix_lookup()
23 struct inode * inode = NULL; in minix_lookup() local
33 inode = minix_iget(dir->i_sb, ino); in minix_lookup()
34 if (IS_ERR(inode)) in minix_lookup()
35 return ERR_CAST(inode); in minix_lookup()
[all …]
/fs/ext3/
Dinode.c44 static int ext3_writepage_trans_blocks(struct inode *inode);
49 static int ext3_inode_is_fast_symlink(struct inode *inode) in ext3_inode_is_fast_symlink() argument
51 int ea_blocks = EXT3_I(inode)->i_file_acl ? in ext3_inode_is_fast_symlink()
52 (inode->i_sb->s_blocksize >> 9) : 0; in ext3_inode_is_fast_symlink()
54 return (S_ISLNK(inode->i_mode) && inode->i_blocks - ea_blocks == 0); in ext3_inode_is_fast_symlink()
66 int ext3_forget(handle_t *handle, int is_metadata, struct inode *inode, in ext3_forget() argument
77 bh, is_metadata, inode->i_mode, in ext3_forget()
78 test_opt(inode->i_sb, DATA_FLAGS)); in ext3_forget()
85 if (test_opt(inode->i_sb, DATA_FLAGS) == EXT3_MOUNT_JOURNAL_DATA || in ext3_forget()
86 (!is_metadata && !ext3_should_journal_data(inode))) { in ext3_forget()
[all …]
/fs/udf/
Dinode.c52 static int udf_update_inode(struct inode *, int);
53 static void udf_fill_inode(struct inode *, struct buffer_head *);
54 static int udf_alloc_i_data(struct inode *inode, size_t size);
55 static struct buffer_head *inode_getblk(struct inode *, sector_t, int *,
57 static int8_t udf_insert_aext(struct inode *, struct extent_position,
59 static void udf_split_extents(struct inode *, int *, int, int,
61 static void udf_prealloc_extents(struct inode *, int, int,
63 static void udf_merge_extents(struct inode *,
65 static void udf_update_extents(struct inode *,
68 static int udf_get_block(struct inode *, sector_t, struct buffer_head *, int);
[all …]
/fs/sysv/
Dnamei.c18 static int add_nondir(struct dentry *dentry, struct inode *inode) in add_nondir() argument
20 int err = sysv_add_link(dentry, inode); in add_nondir()
22 d_instantiate(dentry, inode); in add_nondir()
25 inode_dec_link_count(inode); in add_nondir()
26 iput(inode); in add_nondir()
45 static struct dentry *sysv_lookup(struct inode * dir, struct dentry * dentry, struct nameidata *nd) in sysv_lookup()
47 struct inode * inode = NULL; in sysv_lookup() local
56 inode = sysv_iget(dir->i_sb, ino); in sysv_lookup()
57 if (IS_ERR(inode)) in sysv_lookup()
58 return ERR_CAST(inode); in sysv_lookup()
[all …]
/fs/jfs/
Dinode.c34 struct inode *jfs_iget(struct super_block *sb, unsigned long ino) in jfs_iget()
36 struct inode *inode; in jfs_iget() local
39 inode = iget_locked(sb, ino); in jfs_iget()
40 if (!inode) in jfs_iget()
42 if (!(inode->i_state & I_NEW)) in jfs_iget()
43 return inode; in jfs_iget()
45 ret = diRead(inode); in jfs_iget()
47 iget_failed(inode); in jfs_iget()
51 if (S_ISREG(inode->i_mode)) { in jfs_iget()
52 inode->i_op = &jfs_file_inode_operations; in jfs_iget()
[all …]

12345678910>>...29