/fs/adfs/ |
D | dir_f.c | 24 static void adfs_f_free(struct adfs_dir *dir); 94 adfs_dir_checkbyte(const struct adfs_dir *dir) in adfs_dir_checkbyte() argument 96 struct buffer_head * const *bh = dir->bh; in adfs_dir_checkbyte() 97 const int blocksize_bits = dir->sb->s_blocksize_bits; in adfs_dir_checkbyte() 153 unsigned int size, struct adfs_dir *dir) in adfs_dir_read() argument 167 dir->nr_buffers = 0; in adfs_dir_read() 168 dir->sb = sb; in adfs_dir_read() 180 dir->bh[blk] = sb_bread(sb, phys); in adfs_dir_read() 181 if (!dir->bh[blk]) in adfs_dir_read() 185 memcpy(&dir->dirhead, bufoff(dir->bh, 0), sizeof(dir->dirhead)); in adfs_dir_read() [all …]
|
D | dir_fplus.c | 23 adfs_fplus_read(struct super_block *sb, unsigned int id, unsigned int sz, struct adfs_dir *dir) in adfs_fplus_read() argument 31 dir->nr_buffers = 0; in adfs_fplus_read() 39 dir->bh[0] = sb_bread(sb, block); in adfs_fplus_read() 40 if (!dir->bh[0]) in adfs_fplus_read() 42 dir->nr_buffers += 1; in adfs_fplus_read() 44 h = (struct adfs_bigdirheader *)dir->bh[0]->b_data; in adfs_fplus_read() 64 dir->bh[blk] = sb_bread(sb, block); in adfs_fplus_read() 65 if (!dir->bh[blk]) in adfs_fplus_read() 67 dir->nr_buffers = blk; in adfs_fplus_read() 70 t = (struct adfs_bigdirtail *)(dir->bh[size - 1]->b_data + (sb->s_blocksize - 8)); in adfs_fplus_read() [all …]
|
D | dir.c | 35 struct adfs_dir dir; in adfs_readdir() local 43 ret = ops->read(sb, inode->i_ino, inode->i_size, &dir); in adfs_readdir() 54 if (filldir(dirent, "..", 2, 1, dir.parent_id, DT_DIR) < 0) in adfs_readdir() 64 ret = ops->setpos(&dir, filp->f_pos - 2); in adfs_readdir() 67 while (ops->getnext(&dir, &obj) == 0) { in adfs_readdir() 78 ops->free(&dir); in adfs_readdir() 91 struct adfs_dir dir; in adfs_dir_update() local 101 ret = ops->read(sb, obj->parent_id, 0, &dir); in adfs_dir_update() 106 ret = ops->update(&dir, obj); in adfs_dir_update() 109 ops->free(&dir); in adfs_dir_update() [all …]
|
/fs/reiserfs/ |
D | namei.c | 283 static int reiserfs_find_entry(struct inode *dir, const char *name, int namelen, in reiserfs_find_entry() argument 290 if (namelen > REISERFS_MAX_NAME(dir->i_sb->s_blocksize)) in reiserfs_find_entry() 294 make_cpu_key(&key_to_search, dir, in reiserfs_find_entry() 295 get_third_component(dir->i_sb, name, namelen), in reiserfs_find_entry() 300 search_by_entry_key(dir->i_sb, &key_to_search, in reiserfs_find_entry() 303 reiserfs_warning(dir->i_sb, "zam-7001: io error in %s", in reiserfs_find_entry() 326 static struct dentry *reiserfs_lookup(struct inode *dir, struct dentry *dentry, in reiserfs_lookup() argument 334 if (REISERFS_MAX_NAME(dir->i_sb->s_blocksize) < dentry->d_name.len) in reiserfs_lookup() 337 reiserfs_write_lock(dir->i_sb); in reiserfs_lookup() 340 reiserfs_find_entry(dir, dentry->d_name.name, dentry->d_name.len, in reiserfs_lookup() [all …]
|
/fs/ubifs/ |
D | dir.c | 59 static int inherit_flags(const struct inode *dir, int mode) in inherit_flags() argument 62 const struct ubifs_inode *ui = ubifs_inode(dir); in inherit_flags() 64 if (!S_ISDIR(dir->i_mode)) in inherit_flags() 88 struct inode *ubifs_new_inode(struct ubifs_info *c, const struct inode *dir, in ubifs_new_inode() argument 108 if (dir->i_mode & S_ISGID) { in ubifs_new_inode() 109 inode->i_gid = dir->i_gid; in ubifs_new_inode() 145 ui->flags = inherit_flags(dir, mode); in ubifs_new_inode() 199 static struct dentry *ubifs_lookup(struct inode *dir, struct dentry *dentry, in ubifs_lookup() argument 206 struct ubifs_info *c = dir->i_sb->s_fs_info; in ubifs_lookup() 209 dentry->d_name.len, dentry->d_name.name, dir->i_ino); in ubifs_lookup() [all …]
|
/fs/nfs/ |
D | unlink.c | 23 struct inode *dir; member 34 iput(data->dir); in nfs_free_unlinkdata() 66 static void nfs_dec_sillycount(struct inode *dir) in nfs_dec_sillycount() argument 68 struct nfs_inode *nfsi = NFS_I(dir); in nfs_dec_sillycount() 82 struct inode *dir = data->dir; in nfs_async_unlink_done() local 84 if (!NFS_PROTO(dir)->unlink_done(task, dir)) in nfs_async_unlink_done() 98 struct super_block *sb = data->dir->i_sb; in nfs_async_unlink_release() 100 nfs_dec_sillycount(data->dir); in nfs_async_unlink_release() 110 static int nfs_do_call_unlink(struct dentry *parent, struct inode *dir, struct nfs_unlinkdata *data) in nfs_do_call_unlink() argument 144 nfs_dec_sillycount(dir); in nfs_do_call_unlink() [all …]
|
D | dir.c | 662 void nfs_force_lookup_revalidate(struct inode *dir) in nfs_force_lookup_revalidate() argument 664 NFS_I(dir)->cache_change_attribute++; in nfs_force_lookup_revalidate() 672 static int nfs_check_verifier(struct inode *dir, struct dentry *dentry) in nfs_check_verifier() argument 676 if (NFS_SERVER(dir)->flags & NFS_MOUNT_LOOKUP_CACHE_NONE) in nfs_check_verifier() 678 if (!nfs_verify_change_attribute(dir, dentry->d_time)) in nfs_check_verifier() 681 if (nfs_revalidate_inode(NFS_SERVER(dir), dir) < 0) in nfs_check_verifier() 683 if (!nfs_verify_change_attribute(dir, dentry->d_time)) in nfs_check_verifier() 706 static int nfs_is_exclusive_create(struct inode *dir, struct nameidata *nd) in nfs_is_exclusive_create() argument 708 if (NFS_PROTO(dir)->version == 2) in nfs_is_exclusive_create() 753 int nfs_neg_need_reval(struct inode *dir, struct dentry *dentry, in nfs_neg_need_reval() argument [all …]
|
/fs/ocfs2/ |
D | dir.c | 75 struct inode *dir, 81 struct inode *dir, 91 static int ocfs2_dir_has_trailer(struct inode *dir) in ocfs2_dir_has_trailer() argument 93 if (OCFS2_I(dir)->ip_dyn_features & OCFS2_INLINE_DATA_FL) in ocfs2_dir_has_trailer() 96 return ocfs2_meta_ecc(OCFS2_SB(dir->i_sb)); in ocfs2_dir_has_trailer() 126 static int ocfs2_skip_dir_trailer(struct inode *dir, in ocfs2_skip_dir_trailer() argument 133 if (!ocfs2_dir_has_trailer(dir)) in ocfs2_skip_dir_trailer() 159 static int ocfs2_check_dir_entry(struct inode * dir, in ocfs2_check_dir_entry() argument 173 else if (((char *) de - bh->b_data) + rlen > dir->i_sb->s_blocksize) in ocfs2_check_dir_entry() 179 (unsigned long long)OCFS2_I(dir)->ip_blkno, error_msg, in ocfs2_check_dir_entry() [all …]
|
/fs/omfs/ |
D | dir.c | 24 static struct buffer_head *omfs_get_bucket(struct inode *dir, in omfs_get_bucket() argument 27 int nbuckets = (dir->i_size - OMFS_DIR_START)/8; in omfs_get_bucket() 28 int block = clus_to_blk(OMFS_SB(dir->i_sb), dir->i_ino); in omfs_get_bucket() 32 return sb_bread(dir->i_sb, block); in omfs_get_bucket() 35 static struct buffer_head *omfs_scan_list(struct inode *dir, u64 block, in omfs_scan_list() argument 45 bh = sb_bread(dir->i_sb, in omfs_scan_list() 46 clus_to_blk(OMFS_SB(dir->i_sb), block)); in omfs_scan_list() 53 if (omfs_is_bad(OMFS_SB(dir->i_sb), &oi->i_head, block)) { in omfs_scan_list() 69 static struct buffer_head *omfs_find_entry(struct inode *dir, in omfs_find_entry() argument 76 bh = omfs_get_bucket(dir, name, namelen, &ofs); in omfs_find_entry() [all …]
|
/fs/ext4/ |
D | namei.c | 156 static unsigned dx_root_limit(struct inode *dir, unsigned infosize); 157 static unsigned dx_node_limit(struct inode *dir); 159 struct inode *dir, 172 static int ext4_htree_next_block(struct inode *dir, __u32 hash, 176 static struct buffer_head * ext4_dx_find_entry(struct inode *dir, 238 static inline unsigned dx_root_limit(struct inode *dir, unsigned infosize) in dx_root_limit() argument 240 unsigned entry_space = dir->i_sb->s_blocksize - EXT4_DIR_REC_LEN(1) - in dx_root_limit() 245 static inline unsigned dx_node_limit(struct inode *dir) in dx_node_limit() argument 247 unsigned entry_space = dir->i_sb->s_blocksize - EXT4_DIR_REC_LEN(0); in dx_node_limit() 303 struct stats dx_show_entries(struct dx_hash_info *hinfo, struct inode *dir, in dx_show_entries() argument [all …]
|
/fs/hpfs/ |
D | namei.c | 11 static int hpfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) in hpfs_mkdir() argument 29 fnode = hpfs_alloc_fnode(dir->i_sb, hpfs_i(dir)->i_dno, &fno, &bh); in hpfs_mkdir() 32 dnode = hpfs_alloc_dnode(dir->i_sb, fno, &dno, &qbh0, 1); in hpfs_mkdir() 41 dee.creation_date = dee.write_date = dee.read_date = gmt_to_local(dir->i_sb, get_seconds()); in hpfs_mkdir() 42 result = new_inode(dir->i_sb); in hpfs_mkdir() 47 hpfs_i(result)->i_parent_dir = dir->i_ino; in hpfs_mkdir() 49 …result->i_ctime.tv_sec = result->i_mtime.tv_sec = result->i_atime.tv_sec = local_to_gmt(dir->i_sb,… in hpfs_mkdir() 63 mutex_lock(&hpfs_i(dir)->i_mutex); in hpfs_mkdir() 64 r = hpfs_add_dirent(dir, (char *)name, len, &dee, 0); in hpfs_mkdir() 73 fnode->up = dir->i_ino; in hpfs_mkdir() [all …]
|
/fs/ext3/ |
D | namei.c | 156 static unsigned dx_root_limit (struct inode *dir, unsigned infosize); 157 static unsigned dx_node_limit (struct inode *dir); 159 struct inode *dir, 171 static int ext3_htree_next_block(struct inode *dir, __u32 hash, 175 static struct buffer_head * ext3_dx_find_entry(struct inode *dir, 236 static inline unsigned dx_root_limit (struct inode *dir, unsigned infosize) in dx_root_limit() argument 238 unsigned entry_space = dir->i_sb->s_blocksize - EXT3_DIR_REC_LEN(1) - in dx_root_limit() 243 static inline unsigned dx_node_limit (struct inode *dir) in dx_node_limit() argument 245 unsigned entry_space = dir->i_sb->s_blocksize - EXT3_DIR_REC_LEN(0); in dx_node_limit() 301 struct stats dx_show_entries(struct dx_hash_info *hinfo, struct inode *dir, in dx_show_entries() argument [all …]
|
/fs/bfs/ |
D | dir.c | 24 static int bfs_add_entry(struct inode *dir, const unsigned char *name, 26 static struct buffer_head *bfs_find_entry(struct inode *dir, 32 struct inode *dir = f->f_path.dentry->d_inode; in bfs_readdir() local 35 struct bfs_sb_info *info = BFS_SB(dir->i_sb); in bfs_readdir() 44 dir->i_sb->s_id, dir->i_ino); in bfs_readdir() 49 while (f->f_pos < dir->i_size) { in bfs_readdir() 51 block = BFS_I(dir)->i_sblock + (f->f_pos >> BFS_BSIZE_BITS); in bfs_readdir() 52 bh = sb_bread(dir->i_sb, block); in bfs_readdir() 71 } while ((offset < BFS_BSIZE) && (f->f_pos < dir->i_size)); in bfs_readdir() 88 static int bfs_create(struct inode *dir, struct dentry *dentry, int mode, in bfs_create() argument [all …]
|
/fs/udf/ |
D | dir.c | 39 static int do_udf_readdir(struct inode *dir, struct file *filp, in do_udf_readdir() argument 52 loff_t size = udf_ext0_offset(dir) + dir->i_size; in do_udf_readdir() 72 nf_pos = udf_ext0_offset(dir); in do_udf_readdir() 74 fibh.soffset = fibh.eoffset = nf_pos & (dir->i_sb->s_blocksize - 1); in do_udf_readdir() 75 iinfo = UDF_I(dir); in do_udf_readdir() 77 if (inode_bmap(dir, nf_pos >> dir->i_sb->s_blocksize_bits, in do_udf_readdir() 83 block = udf_get_lb_pblock(dir->i_sb, eloc, offset); in do_udf_readdir() 84 if ((++offset << dir->i_sb->s_blocksize_bits) < elen) { in do_udf_readdir() 94 if (!(fibh.sbh = fibh.ebh = udf_tread(dir->i_sb, block))) { in do_udf_readdir() 99 if (!(offset & ((16 >> (dir->i_sb->s_blocksize_bits - 9)) - 1))) { in do_udf_readdir() [all …]
|
D | namei.c | 144 static struct fileIdentDesc *udf_find_entry(struct inode *dir, in udf_find_entry() argument 161 struct udf_inode_info *dinfo = UDF_I(dir); in udf_find_entry() 165 size = udf_ext0_offset(dir) + dir->i_size; in udf_find_entry() 166 f_pos = udf_ext0_offset(dir); in udf_find_entry() 169 fibh->soffset = fibh->eoffset = f_pos & (dir->i_sb->s_blocksize - 1); in udf_find_entry() 171 if (inode_bmap(dir, f_pos >> dir->i_sb->s_blocksize_bits, &epos, in udf_find_entry() 174 block = udf_get_lb_pblock(dir->i_sb, eloc, offset); in udf_find_entry() 175 if ((++offset << dir->i_sb->s_blocksize_bits) < elen) { in udf_find_entry() 183 fibh->sbh = fibh->ebh = udf_tread(dir->i_sb, block); in udf_find_entry() 193 fi = udf_fileident_read(dir, &f_pos, fibh, cfi, &epos, &eloc, in udf_find_entry() [all …]
|
D | directory.c | 22 static uint8_t *udf_filead_read(struct inode *dir, uint8_t *tmpad, 43 if (*offset == dir->i_sb->s_blocksize) { 45 block = udf_get_lb_pblock(dir->i_sb, fe_loc, ++*pos); 48 *bh = udf_tread(dir->i_sb, block); 51 } else if (*offset > dir->i_sb->s_blocksize) { 54 remainder = dir->i_sb->s_blocksize - loffset; 58 block = udf_get_lb_pblock(dir->i_sb, fe_loc, ++*pos); 61 (*bh) = udf_tread(dir->i_sb, block); 74 struct fileIdentDesc *udf_fileident_read(struct inode *dir, loff_t *nf_pos, in udf_fileident_read() argument 84 struct udf_inode_info *iinfo = UDF_I(dir); in udf_fileident_read() [all …]
|
/fs/ufs/ |
D | dir.c | 46 struct inode *dir = mapping->host; in ufs_commit_chunk() local 49 dir->i_version++; in ufs_commit_chunk() 51 if (pos+len > dir->i_size) { in ufs_commit_chunk() 52 i_size_write(dir, pos+len); in ufs_commit_chunk() 53 mark_inode_dirty(dir); in ufs_commit_chunk() 55 if (IS_DIRSYNC(dir)) in ufs_commit_chunk() 73 ino_t ufs_inode_by_name(struct inode *dir, struct dentry *dentry) in ufs_inode_by_name() argument 79 de = ufs_find_entry(dir, dentry, &page); in ufs_inode_by_name() 81 res = fs32_to_cpu(dir->i_sb, de->d_ino); in ufs_inode_by_name() 89 void ufs_set_link(struct inode *dir, struct ufs_dir_entry *de, in ufs_set_link() argument [all …]
|
D | namei.c | 50 static struct dentry *ufs_lookup(struct inode * dir, struct dentry *dentry, struct nameidata *nd) in ufs_lookup() argument 59 ino = ufs_inode_by_name(dir, dentry); in ufs_lookup() 61 inode = ufs_iget(dir->i_sb, ino); in ufs_lookup() 80 static int ufs_create (struct inode * dir, struct dentry * dentry, int mode, in ufs_create() argument 87 inode = ufs_new_inode(dir, mode); in ufs_create() 103 static int ufs_mknod (struct inode * dir, struct dentry *dentry, int mode, dev_t rdev) in ufs_mknod() argument 110 inode = ufs_new_inode(dir, mode); in ufs_mknod() 123 static int ufs_symlink (struct inode * dir, struct dentry * dentry, in ufs_symlink() argument 126 struct super_block * sb = dir->i_sb; in ufs_symlink() 135 inode = ufs_new_inode(dir, S_IFLNK | S_IRWXUGO); in ufs_symlink() [all …]
|
/fs/ext2/ |
D | dir.c | 87 struct inode *dir = mapping->host; in ext2_commit_chunk() local 90 dir->i_version++; in ext2_commit_chunk() 93 if (pos+len > dir->i_size) { in ext2_commit_chunk() 94 i_size_write(dir, pos+len); in ext2_commit_chunk() 95 mark_inode_dirty(dir); in ext2_commit_chunk() 98 if (IS_DIRSYNC(dir)) { in ext2_commit_chunk() 101 err = ext2_sync_inode(dir); in ext2_commit_chunk() 111 struct inode *dir = page->mapping->host; in ext2_check_page() local 112 struct super_block *sb = dir->i_sb; in ext2_check_page() 113 unsigned chunk_size = ext2_chunk_size(dir); in ext2_check_page() [all …]
|
/fs/minix/ |
D | namei.c | 21 static struct dentry *minix_lookup(struct inode * dir, struct dentry *dentry, struct nameidata *nd) in minix_lookup() argument 26 dentry->d_op = dir->i_sb->s_root->d_op; in minix_lookup() 28 if (dentry->d_name.len > minix_sb(dir->i_sb)->s_namelen) in minix_lookup() 33 inode = minix_iget(dir->i_sb, ino); in minix_lookup() 41 static int minix_mknod(struct inode * dir, struct dentry *dentry, int mode, dev_t rdev) in minix_mknod() argument 49 inode = minix_new_inode(dir, &error); in minix_mknod() 60 static int minix_create(struct inode * dir, struct dentry *dentry, int mode, in minix_create() argument 63 return minix_mknod(dir, dentry, mode, 0); in minix_create() 66 static int minix_symlink(struct inode * dir, struct dentry *dentry, in minix_symlink() argument 73 if (i > dir->i_sb->s_blocksize) in minix_symlink() [all …]
|
/fs/affs/ |
D | amigaffs.c | 27 affs_insert_hash(struct inode *dir, struct buffer_head *bh) in affs_insert_hash() argument 29 struct super_block *sb = dir->i_sb; in affs_insert_hash() 37 pr_debug("AFFS: insert_hash(dir=%u, ino=%d)\n", (u32)dir->i_ino, ino); in affs_insert_hash() 39 dir_bh = affs_bread(sb, dir->i_ino); in affs_insert_hash() 51 AFFS_TAIL(sb, bh)->parent = cpu_to_be32(dir->i_ino); in affs_insert_hash() 55 if (dir->i_ino == dir_bh->b_blocknr) in affs_insert_hash() 61 mark_buffer_dirty_inode(dir_bh, dir); in affs_insert_hash() 64 dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC; in affs_insert_hash() 65 dir->i_version++; in affs_insert_hash() 66 mark_inode_dirty(dir); in affs_insert_hash() [all …]
|
/fs/qnx4/ |
D | namei.c | 68 static struct buffer_head *qnx4_find_entry(int len, struct inode *dir, in qnx4_find_entry() argument 75 if (!dir->i_sb) { in qnx4_find_entry() 81 while (blkofs * QNX4_BLOCK_SIZE + offset < dir->i_size) { in qnx4_find_entry() 83 bh = qnx4_bread(dir, blkofs, 0); in qnx4_find_entry() 91 block = qnx4_block_map( dir, blkofs ); in qnx4_find_entry() 109 struct dentry * qnx4_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd) in qnx4_lookup() argument 120 if (!(bh = qnx4_find_entry(len, dir, name, &de, &ino))) in qnx4_lookup() 131 foundinode = qnx4_iget(dir->i_sb, ino); in qnx4_lookup() 146 int qnx4_create(struct inode *dir, struct dentry *dentry, int mode, in qnx4_create() argument 150 if (dir == NULL) { in qnx4_create() [all …]
|
/fs/coda/ |
D | dir.c | 32 static int coda_create(struct inode *dir, struct dentry *new, int mode, struct nameidata *nd); 33 static struct dentry *coda_lookup(struct inode *dir, struct dentry *target, struct nameidata *nd); 96 static struct dentry *coda_lookup(struct inode *dir, struct dentry *entry, struct nameidata *nd) in coda_lookup() argument 107 coda_i2s(dir), (int)length, name); in coda_lookup() 112 if (coda_isroot(dir) && coda_iscontrol(name, length)) { in coda_lookup() 113 error = coda_cnode_makectl(&inode, dir->i_sb); in coda_lookup() 120 error = venus_lookup(dir->i_sb, coda_i2f(dir), name, length, in coda_lookup() 123 error = coda_cnode_make(&inode, &resfid, dir->i_sb); in coda_lookup() 168 static inline void coda_dir_update_mtime(struct inode *dir) in coda_dir_update_mtime() argument 173 coda_flag_inode(dir, C_VATTR); in coda_dir_update_mtime() [all …]
|
/fs/sysv/ |
D | namei.c | 45 static struct dentry *sysv_lookup(struct inode * dir, struct dentry * dentry, struct nameidata *nd) in sysv_lookup() argument 50 dentry->d_op = dir->i_sb->s_root->d_op; in sysv_lookup() 56 inode = sysv_iget(dir->i_sb, ino); in sysv_lookup() 64 static int sysv_mknod(struct inode * dir, struct dentry * dentry, int mode, dev_t rdev) in sysv_mknod() argument 72 inode = sysv_new_inode(dir, mode); in sysv_mknod() 83 static int sysv_create(struct inode * dir, struct dentry * dentry, int mode, struct nameidata *nd) in sysv_create() argument 85 return sysv_mknod(dir, dentry, mode, 0); in sysv_create() 88 static int sysv_symlink(struct inode * dir, struct dentry * dentry, in sysv_symlink() argument 95 if (l > dir->i_sb->s_blocksize) in sysv_symlink() 98 inode = sysv_new_inode(dir, S_IFLNK|0777); in sysv_symlink() [all …]
|
/fs/isofs/ |
D | namei.c | 50 isofs_find_entry(struct inode *dir, struct dentry *dentry, in isofs_find_entry() argument 54 unsigned long bufsize = ISOFS_BUFFER_SIZE(dir); in isofs_find_entry() 55 unsigned char bufbits = ISOFS_BUFFER_BITS(dir); in isofs_find_entry() 58 struct isofs_sb_info *sbi = ISOFS_SB(dir->i_sb); in isofs_find_entry() 60 if (!ISOFS_I(dir)->i_first_extent) in isofs_find_entry() 67 while (f_pos < dir->i_size) { in isofs_find_entry() 73 bh = isofs_bread(dir, block); in isofs_find_entry() 104 bh = isofs_bread(dir, block); in isofs_find_entry() 118 dir->i_ino); in isofs_find_entry() 123 ((i = get_rock_ridge_filename(de, tmpname, dir)))) { in isofs_find_entry() [all …]
|