/linux-3.4.99/fs/ |
D | inode.c | 124 int inode_init_always(struct super_block *sb, struct inode *inode) in inode_init_always() argument 128 struct address_space *const mapping = &inode->i_data; in inode_init_always() 130 inode->i_sb = sb; in inode_init_always() 131 inode->i_blkbits = sb->s_blocksize_bits; in inode_init_always() 132 inode->i_flags = 0; in inode_init_always() 133 atomic_set(&inode->i_count, 1); in inode_init_always() 134 inode->i_op = &empty_iops; in inode_init_always() 135 inode->i_fop = &empty_fops; in inode_init_always() 136 inode->__i_nlink = 1; in inode_init_always() 137 inode->i_opflags = 0; in inode_init_always() [all …]
|
/linux-3.4.99/fs/affs/ |
D | inode.c | 19 struct inode *affs_iget(struct super_block *sb, unsigned long ino) in affs_iget() 25 struct inode *inode; in affs_iget() local 31 inode = iget_locked(sb, ino); in affs_iget() 32 if (!inode) in affs_iget() 34 if (!(inode->i_state & I_NEW)) in affs_iget() 35 return inode; in affs_iget() 37 pr_debug("AFFS: affs_iget(%lu)\n", inode->i_ino); in affs_iget() 39 block = inode->i_ino; in affs_iget() 56 inode->i_size = 0; in affs_iget() 57 set_nlink(inode, 1); in affs_iget() [all …]
|
/linux-3.4.99/include/linux/ |
D | quotaops.h | 22 static inline bool is_quota_modification(struct inode *inode, struct iattr *ia) in is_quota_modification() argument 24 return (ia->ia_valid & ATTR_SIZE && ia->ia_size != inode->i_size) || in is_quota_modification() 25 (ia->ia_valid & ATTR_UID && ia->ia_uid != inode->i_uid) || in is_quota_modification() 26 (ia->ia_valid & ATTR_GID && ia->ia_gid != inode->i_gid); in is_quota_modification() 41 void inode_add_rsv_space(struct inode *inode, qsize_t number); 42 void inode_claim_rsv_space(struct inode *inode, qsize_t number); 43 void inode_sub_rsv_space(struct inode *inode, qsize_t number); 45 void dquot_initialize(struct inode *inode); 46 void dquot_drop(struct inode *inode); 55 int __dquot_alloc_space(struct inode *inode, qsize_t number, int flags); [all …]
|
D | nfs_fs.h | 209 struct inode vfs_inode; 237 static inline struct nfs_inode *NFS_I(const struct inode *inode) in NFS_I() argument 239 return container_of(inode, struct nfs_inode, vfs_inode); in NFS_I() 247 static inline struct nfs_fh *NFS_FH(const struct inode *inode) in NFS_FH() argument 249 return &NFS_I(inode)->fh; in NFS_FH() 252 static inline struct nfs_server *NFS_SERVER(const struct inode *inode) in NFS_SERVER() argument 254 return NFS_SB(inode->i_sb); in NFS_SERVER() 257 static inline struct rpc_clnt *NFS_CLIENT(const struct inode *inode) in NFS_CLIENT() argument 259 return NFS_SERVER(inode)->client; in NFS_CLIENT() 262 static inline const struct nfs_rpc_ops *NFS_PROTO(const struct inode *inode) in NFS_PROTO() argument [all …]
|
/linux-3.4.99/fs/nfs/ |
D | inode.c | 63 static void nfs_invalidate_inode(struct inode *); 64 static int nfs_update_inode(struct inode *, struct nfs_fattr *); 109 static void nfs_clear_inode(struct inode *inode) in nfs_clear_inode() argument 114 BUG_ON(nfs_have_writebacks(inode)); in nfs_clear_inode() 115 BUG_ON(!list_empty(&NFS_I(inode)->open_files)); in nfs_clear_inode() 116 nfs_zap_acl_cache(inode); in nfs_clear_inode() 117 nfs_access_zap_cache(inode); in nfs_clear_inode() 118 nfs_fscache_release_inode_cookie(inode); in nfs_clear_inode() 121 void nfs_evict_inode(struct inode *inode) in nfs_evict_inode() argument 123 truncate_inode_pages(&inode->i_data, 0); in nfs_evict_inode() [all …]
|
/linux-3.4.99/fs/logfs/ |
D | inode.c | 53 static void logfs_inode_setops(struct inode *inode) in logfs_inode_setops() argument 55 switch (inode->i_mode & S_IFMT) { in logfs_inode_setops() 57 inode->i_op = &logfs_dir_iops; in logfs_inode_setops() 58 inode->i_fop = &logfs_dir_fops; in logfs_inode_setops() 59 inode->i_mapping->a_ops = &logfs_reg_aops; in logfs_inode_setops() 62 inode->i_op = &logfs_reg_iops; in logfs_inode_setops() 63 inode->i_fop = &logfs_reg_fops; in logfs_inode_setops() 64 inode->i_mapping->a_ops = &logfs_reg_aops; in logfs_inode_setops() 67 inode->i_op = &logfs_symlink_iops; in logfs_inode_setops() 68 inode->i_mapping->a_ops = &logfs_reg_aops; in logfs_inode_setops() [all …]
|
/linux-3.4.99/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-3.4.99/fs/hfs/ |
D | inode.c | 64 struct inode *inode = page->mapping->host; in hfs_releasepage() local 65 struct super_block *sb = inode->i_sb; in hfs_releasepage() 71 switch (inode->i_ino) { in hfs_releasepage() 123 struct inode *inode = file->f_path.dentry->d_inode->i_mapping->host; in hfs_direct_IO() local 126 ret = blockdev_direct_IO(rw, iocb, inode, iov, offset, nr_segs, in hfs_direct_IO() 134 loff_t isize = i_size_read(inode); in hfs_direct_IO() 138 vmtruncate(inode, isize); in hfs_direct_IO() 172 struct inode *hfs_new_inode(struct inode *dir, struct qstr *name, umode_t mode) in hfs_new_inode() 175 struct inode *inode = new_inode(sb); in hfs_new_inode() local 176 if (!inode) in hfs_new_inode() [all …]
|
/linux-3.4.99/fs/nilfs2/ |
D | inode.c | 44 void nilfs_inode_add_blocks(struct inode *inode, int n) in nilfs_inode_add_blocks() argument 46 struct nilfs_root *root = NILFS_I(inode)->i_root; in nilfs_inode_add_blocks() 48 inode_add_bytes(inode, (1 << inode->i_blkbits) * n); in nilfs_inode_add_blocks() 53 void nilfs_inode_sub_blocks(struct inode *inode, int n) in nilfs_inode_sub_blocks() argument 55 struct nilfs_root *root = NILFS_I(inode)->i_root; in nilfs_inode_sub_blocks() 57 inode_sub_bytes(inode, (1 << inode->i_blkbits) * n); in nilfs_inode_sub_blocks() 73 int nilfs_get_block(struct inode *inode, sector_t blkoff, in nilfs_get_block() argument 76 struct nilfs_inode_info *ii = NILFS_I(inode); in nilfs_get_block() 77 struct the_nilfs *nilfs = inode->i_sb->s_fs_info; in nilfs_get_block() 80 unsigned maxblocks = bh_result->b_size >> inode->i_blkbits; in nilfs_get_block() [all …]
|
D | alloc.c | 40 nilfs_palloc_groups_per_desc_block(const struct inode *inode) in nilfs_palloc_groups_per_desc_block() argument 42 return (1UL << inode->i_blkbits) / in nilfs_palloc_groups_per_desc_block() 51 nilfs_palloc_groups_count(const struct inode *inode) in nilfs_palloc_groups_count() argument 53 return 1UL << (BITS_PER_LONG - (inode->i_blkbits + 3 /* log2(8) */)); in nilfs_palloc_groups_count() 61 int nilfs_palloc_init_blockgroup(struct inode *inode, unsigned entry_size) in nilfs_palloc_init_blockgroup() argument 63 struct nilfs_mdt_info *mi = NILFS_MDT(inode); in nilfs_palloc_init_blockgroup() 71 nilfs_mdt_set_entry_size(inode, entry_size, 0); in nilfs_palloc_init_blockgroup() 74 DIV_ROUND_UP(nilfs_palloc_entries_per_group(inode), in nilfs_palloc_init_blockgroup() 79 nilfs_palloc_groups_per_desc_block(inode) * in nilfs_palloc_init_blockgroup() 92 static unsigned long nilfs_palloc_group(const struct inode *inode, __u64 nr, in nilfs_palloc_group() argument [all …]
|
D | mdt.h | 62 static inline struct nilfs_mdt_info *NILFS_MDT(const struct inode *inode) in NILFS_MDT() argument 64 return inode->i_private; in NILFS_MDT() 70 int nilfs_mdt_get_block(struct inode *, unsigned long, int, 71 void (*init_block)(struct inode *, 74 int nilfs_mdt_delete_block(struct inode *, unsigned long); 75 int nilfs_mdt_forget_block(struct inode *, unsigned long); 76 int nilfs_mdt_mark_block_dirty(struct inode *, unsigned long); 77 int nilfs_mdt_fetch_dirty(struct inode *); 79 int nilfs_mdt_init(struct inode *inode, gfp_t gfp_mask, size_t objsz); 80 void nilfs_mdt_set_entry_size(struct inode *, unsigned, unsigned); [all …]
|
/linux-3.4.99/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(dentry, inode); in ext2_add_nondir() 45 unlock_new_inode(inode); in ext2_add_nondir() 48 inode_dec_link_count(inode); in ext2_add_nondir() 49 unlock_new_inode(inode); in ext2_add_nondir() 50 iput(inode); in ext2_add_nondir() 58 static struct dentry *ext2_lookup(struct inode * dir, struct dentry *dentry, struct nameidata *nd) in ext2_lookup() 60 struct inode * inode; in ext2_lookup() local 67 inode = NULL; in ext2_lookup() [all …]
|
D | inode.c | 38 static int __ext2_write_inode(struct inode *inode, int do_sync); 43 static inline int ext2_inode_is_fast_symlink(struct inode *inode) in ext2_inode_is_fast_symlink() argument 45 int ea_blocks = EXT2_I(inode)->i_file_acl ? in ext2_inode_is_fast_symlink() 46 (inode->i_sb->s_blocksize >> 9) : 0; in ext2_inode_is_fast_symlink() 48 return (S_ISLNK(inode->i_mode) && in ext2_inode_is_fast_symlink() 49 inode->i_blocks - ea_blocks == 0); in ext2_inode_is_fast_symlink() 52 static void ext2_truncate_blocks(struct inode *inode, loff_t offset); 56 struct inode *inode = mapping->host; in ext2_write_failed() local 58 if (to > inode->i_size) { in ext2_write_failed() 59 truncate_pagecache(inode, to, inode->i_size); in ext2_write_failed() [all …]
|
/linux-3.4.99/fs/ocfs2/ |
D | inode.c | 69 static int ocfs2_read_locked_inode(struct inode *inode, 71 static int ocfs2_init_locked_inode(struct inode *inode, void *opaque); 72 static int ocfs2_find_actor(struct inode *inode, void *opaque); 74 struct inode *inode, 77 void ocfs2_set_inode_flags(struct inode *inode) in ocfs2_set_inode_flags() argument 79 unsigned int flags = OCFS2_I(inode)->ip_attr; in ocfs2_set_inode_flags() 81 inode->i_flags &= ~(S_IMMUTABLE | in ocfs2_set_inode_flags() 85 inode->i_flags |= S_IMMUTABLE; in ocfs2_set_inode_flags() 88 inode->i_flags |= S_SYNC; in ocfs2_set_inode_flags() 90 inode->i_flags |= S_APPEND; in ocfs2_set_inode_flags() [all …]
|
/linux-3.4.99/fs/reiserfs/ |
D | inode.c | 25 void reiserfs_evict_inode(struct inode *inode) in reiserfs_evict_inode() argument 30 2 * REISERFS_QUOTA_INIT_BLOCKS(inode->i_sb); in reiserfs_evict_inode() 35 if (!inode->i_nlink && !is_bad_inode(inode)) in reiserfs_evict_inode() 36 dquot_initialize(inode); in reiserfs_evict_inode() 38 truncate_inode_pages(&inode->i_data, 0); in reiserfs_evict_inode() 39 if (inode->i_nlink) in reiserfs_evict_inode() 42 depth = reiserfs_write_lock_once(inode->i_sb); in reiserfs_evict_inode() 45 …if (!(inode->i_state & I_NEW) && INODE_PKEY(inode)->k_objectid != 0) { /* also handles bad_inode c… in reiserfs_evict_inode() 46 reiserfs_delete_xattrs(inode); in reiserfs_evict_inode() 48 if (journal_begin(&th, inode->i_sb, jbegin_count)) in reiserfs_evict_inode() [all …]
|
/linux-3.4.99/fs/exofs/ |
D | namei.c | 36 static inline int exofs_add_nondir(struct dentry *dentry, struct inode *inode) in exofs_add_nondir() argument 38 int err = exofs_add_link(dentry, inode); in exofs_add_nondir() 40 d_instantiate(dentry, inode); in exofs_add_nondir() 43 inode_dec_link_count(inode); in exofs_add_nondir() 44 iput(inode); in exofs_add_nondir() 48 static struct dentry *exofs_lookup(struct inode *dir, struct dentry *dentry, in exofs_lookup() 51 struct inode *inode; in exofs_lookup() local 58 inode = ino ? exofs_iget(dir->i_sb, ino) : NULL; in exofs_lookup() 59 return d_splice_alias(inode, dentry); in exofs_lookup() 62 static int exofs_create(struct inode *dir, struct dentry *dentry, umode_t mode, in exofs_create() [all …]
|
/linux-3.4.99/fs/squashfs/ |
D | inode.c | 56 static int squashfs_new_inode(struct super_block *sb, struct inode *inode, in squashfs_new_inode() argument 61 err = squashfs_get_id(sb, le16_to_cpu(sqsh_ino->uid), &inode->i_uid); in squashfs_new_inode() 65 err = squashfs_get_id(sb, le16_to_cpu(sqsh_ino->guid), &inode->i_gid); in squashfs_new_inode() 69 inode->i_ino = le32_to_cpu(sqsh_ino->inode_number); in squashfs_new_inode() 70 inode->i_mtime.tv_sec = le32_to_cpu(sqsh_ino->mtime); in squashfs_new_inode() 71 inode->i_atime.tv_sec = inode->i_mtime.tv_sec; in squashfs_new_inode() 72 inode->i_ctime.tv_sec = inode->i_mtime.tv_sec; in squashfs_new_inode() 73 inode->i_mode = le16_to_cpu(sqsh_ino->mode); in squashfs_new_inode() 74 inode->i_size = 0; in squashfs_new_inode() 80 struct inode *squashfs_iget(struct super_block *sb, long long ino, in squashfs_iget() [all …]
|
/linux-3.4.99/fs/adfs/ |
D | inode.c | 19 adfs_get_block(struct inode *inode, sector_t block, struct buffer_head *bh, in adfs_get_block() argument 23 if (block >= inode->i_blocks) in adfs_get_block() 26 block = __adfs_block_map(inode->i_sb, inode->i_ino, block); in adfs_get_block() 28 map_bh(bh, inode->i_sb, block); in adfs_get_block() 84 adfs_atts2mode(struct super_block *sb, struct inode *inode) in adfs_atts2mode() argument 86 unsigned int attr = ADFS_I(inode)->attr; in adfs_atts2mode() 95 switch (ADFS_I(inode)->filetype) { in adfs_atts2mode() 128 adfs_mode2atts(struct super_block *sb, struct inode *inode) in adfs_mode2atts() argument 135 if (S_ISLNK(inode->i_mode)) in adfs_mode2atts() 136 return ADFS_I(inode)->attr; in adfs_mode2atts() [all …]
|
/linux-3.4.99/fs/hfsplus/ |
D | inode.c | 57 struct inode *inode = page->mapping->host; in hfsplus_releasepage() local 58 struct super_block *sb = inode->i_sb; in hfsplus_releasepage() 64 switch (inode->i_ino) { in hfsplus_releasepage() 119 struct inode *inode = file->f_path.dentry->d_inode->i_mapping->host; in hfsplus_direct_IO() local 122 ret = blockdev_direct_IO(rw, iocb, inode, iov, offset, nr_segs, in hfsplus_direct_IO() 130 loff_t isize = i_size_read(inode); in hfsplus_direct_IO() 134 vmtruncate(inode, isize); in hfsplus_direct_IO() 170 static struct dentry *hfsplus_file_lookup(struct inode *dir, in hfsplus_file_lookup() 175 struct inode *inode = NULL; in hfsplus_file_lookup() local 182 inode = HFSPLUS_I(dir)->rsrc_inode; in hfsplus_file_lookup() [all …]
|
/linux-3.4.99/fs/ufs/ |
D | namei.c | 37 static inline int ufs_add_nondir(struct dentry *dentry, struct inode *inode) in ufs_add_nondir() argument 39 int err = ufs_add_link(dentry, inode); in ufs_add_nondir() 41 d_instantiate(dentry, inode); in ufs_add_nondir() 44 inode_dec_link_count(inode); in ufs_add_nondir() 45 iput(inode); in ufs_add_nondir() 49 static struct dentry *ufs_lookup(struct inode * dir, struct dentry *dentry, struct nameidata *nd) in ufs_lookup() 51 struct inode * inode = NULL; in ufs_lookup() local 60 inode = ufs_iget(dir->i_sb, ino); in ufs_lookup() 62 return d_splice_alias(inode, dentry); in ufs_lookup() 73 static int ufs_create (struct inode * dir, struct dentry * dentry, umode_t mode, in ufs_create() [all …]
|
/linux-3.4.99/fs/9p/ |
D | cache.h | 35 extern void v9fs_cache_inode_get_cookie(struct inode *inode); 36 extern void v9fs_cache_inode_put_cookie(struct inode *inode); 37 extern void v9fs_cache_inode_flush_cookie(struct inode *inode); 38 extern void v9fs_cache_inode_set_cookie(struct inode *inode, struct file *filp); 39 extern void v9fs_cache_inode_reset_cookie(struct inode *inode); 46 extern int __v9fs_readpage_from_fscache(struct inode *inode, 48 extern int __v9fs_readpages_from_fscache(struct inode *inode, 52 extern void __v9fs_readpage_to_fscache(struct inode *inode, struct page *page); 53 extern void __v9fs_fscache_wait_on_page_write(struct inode *inode, 67 static inline int v9fs_readpage_from_fscache(struct inode *inode, in v9fs_readpage_from_fscache() argument [all …]
|
/linux-3.4.99/fs/sysv/ |
D | namei.c | 18 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() 30 static int sysv_hash(const struct dentry *dentry, const struct inode *inode, in sysv_hash() argument 46 static struct dentry *sysv_lookup(struct inode * dir, struct dentry * dentry, struct nameidata *nd) in sysv_lookup() 48 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() [all …]
|
/linux-3.4.99/fs/ext4/ |
D | inode.c | 51 static inline int ext4_begin_ordered_truncate(struct inode *inode, in ext4_begin_ordered_truncate() argument 54 trace_ext4_begin_ordered_truncate(inode, new_size); in ext4_begin_ordered_truncate() 61 if (!EXT4_I(inode)->jinode) in ext4_begin_ordered_truncate() 63 return jbd2_journal_begin_ordered_truncate(EXT4_JOURNAL(inode), in ext4_begin_ordered_truncate() 64 EXT4_I(inode)->jinode, in ext4_begin_ordered_truncate() 69 static int noalloc_get_block_write(struct inode *inode, sector_t iblock, 71 static int ext4_set_bh_endio(struct buffer_head *bh, struct inode *inode); 76 struct inode *inode, struct page *page, loff_t from, 82 static int ext4_inode_is_fast_symlink(struct inode *inode) in ext4_inode_is_fast_symlink() argument 84 int ea_blocks = EXT4_I(inode)->i_file_acl ? in ext4_inode_is_fast_symlink() [all …]
|
/linux-3.4.99/fs/notify/ |
D | inode_mark.c | 36 static void fsnotify_recalc_inode_mask_locked(struct inode *inode) in fsnotify_recalc_inode_mask_locked() argument 42 assert_spin_locked(&inode->i_lock); in fsnotify_recalc_inode_mask_locked() 44 hlist_for_each_entry(mark, pos, &inode->i_fsnotify_marks, i.i_list) in fsnotify_recalc_inode_mask_locked() 46 inode->i_fsnotify_mask = new_mask; in fsnotify_recalc_inode_mask_locked() 53 void fsnotify_recalc_inode_mask(struct inode *inode) in fsnotify_recalc_inode_mask() argument 55 spin_lock(&inode->i_lock); in fsnotify_recalc_inode_mask() 56 fsnotify_recalc_inode_mask_locked(inode); in fsnotify_recalc_inode_mask() 57 spin_unlock(&inode->i_lock); in fsnotify_recalc_inode_mask() 59 __fsnotify_update_child_dentry_flags(inode); in fsnotify_recalc_inode_mask() 64 struct inode *inode = mark->i.inode; in fsnotify_destroy_inode_mark() local [all …]
|
/linux-3.4.99/fs/minix/ |
D | namei.c | 9 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 31 inode = minix_iget(dir->i_sb, ino); in minix_lookup() 32 if (IS_ERR(inode)) in minix_lookup() 33 return ERR_CAST(inode); in minix_lookup() [all …]
|