Lines Matching refs:dir
228 while (clu.dir != EXFAT_EOF_CLUSTER) { in exfat_search_empty_slot()
244 clu.dir, clu.size, clu.flags); in exfat_search_empty_slot()
260 p_dir->dir, clu.dir); in exfat_search_empty_slot()
277 clu.dir++; in exfat_search_empty_slot()
279 clu.dir = EXFAT_EOF_CLUSTER; in exfat_search_empty_slot()
281 if (exfat_get_next_cluster(sb, &clu.dir)) in exfat_search_empty_slot()
347 if (exfat_zeroed_cluster(inode, clu.dir)) in exfat_find_empty_entry()
355 exfat_chain_cont_cluster(sb, p_dir->dir, p_dir->size); in exfat_find_empty_entry()
361 if (exfat_ent_set(sb, last_clu, clu.dir)) in exfat_find_empty_entry()
371 exfat_chain_set(&hint_femp.cur, clu.dir, 0, clu.flags); in exfat_find_empty_entry()
378 if (p_dir->dir != sbi->root_dir) { in exfat_find_empty_entry()
382 &(ei->dir), ei->entry + 1, &bh, §or); in exfat_find_empty_entry()
391 if (exfat_update_dir_chksum(inode, &(ei->dir), in exfat_find_empty_entry()
453 const unsigned char *path, struct exfat_chain *dir, in exfat_resolve_path() argument
456 return __exfat_resolve_path(inode, path, dir, uni, 0); in exfat_resolve_path()
460 const unsigned char *path, struct exfat_chain *dir, in exfat_resolve_path_for_lookup() argument
463 return __exfat_resolve_path(inode, path, dir, uni, 1); in exfat_resolve_path_for_lookup()
468 return ((loff_t) info->dir.dir << 32) | (info->entry & 0xffffffff); in exfat_make_i_pos()
504 start_clu = clu.dir; in exfat_add_entry()
521 info->dir = *p_dir; in exfat_add_entry()
544 static int exfat_create(struct inode *dir, struct dentry *dentry, umode_t mode, in exfat_create() argument
547 struct super_block *sb = dir->i_sb; in exfat_create()
556 err = exfat_add_entry(dir, dentry->d_name.name, &cdir, TYPE_FILE, in exfat_create()
562 inode_inc_iversion(dir); in exfat_create()
563 dir->i_ctime = dir->i_mtime = current_time(dir); in exfat_create()
564 if (IS_DIRSYNC(dir)) in exfat_create()
565 exfat_sync_inode(dir); in exfat_create()
567 mark_inode_dirty(dir); in exfat_create()
588 static int exfat_find(struct inode *dir, struct qstr *qname, in exfat_find() argument
594 struct super_block *sb = dir->i_sb; in exfat_find()
596 struct exfat_inode_info *ei = EXFAT_I(dir); in exfat_find()
604 ret = exfat_resolve_path_for_lookup(dir, qname->name, &cdir, &uni_name); in exfat_find()
613 if (ei->version != (inode_peek_iversion_raw(dir) & 0xffffffff)) { in exfat_find()
614 ei->hint_stat.clu = cdir.dir; in exfat_find()
616 ei->version = (inode_peek_iversion_raw(dir) & 0xffffffff); in exfat_find()
627 info->dir = cdir; in exfat_find()
669 i_size_read(dir), ei->dir.dir, ei->entry); in exfat_find()
690 static struct dentry *exfat_lookup(struct inode *dir, struct dentry *dentry, in exfat_lookup() argument
693 struct super_block *sb = dir->i_sb; in exfat_lookup()
702 err = exfat_find(dir, &dentry->d_name, &info); in exfat_lookup()
758 exfat_d_version_set(dentry, inode_query_iversion(dir)); in exfat_lookup()
767 static int exfat_unlink(struct inode *dir, struct dentry *dentry) in exfat_unlink() argument
771 struct super_block *sb = dir->i_sb; in exfat_unlink()
779 exfat_chain_dup(&cdir, &ei->dir); in exfat_unlink()
781 if (ei->dir.dir == DIR_DELETED) { in exfat_unlink()
803 if (exfat_remove_entries(dir, &cdir, entry, 0, num_entries)) { in exfat_unlink()
809 ei->dir.dir = DIR_DELETED; in exfat_unlink()
812 inode_inc_iversion(dir); in exfat_unlink()
813 dir->i_mtime = dir->i_atime = current_time(dir); in exfat_unlink()
814 exfat_truncate_atime(&dir->i_atime); in exfat_unlink()
815 if (IS_DIRSYNC(dir)) in exfat_unlink()
816 exfat_sync_inode(dir); in exfat_unlink()
818 mark_inode_dirty(dir); in exfat_unlink()
824 exfat_d_version_set(dentry, inode_query_iversion(dir)); in exfat_unlink()
830 static int exfat_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) in exfat_mkdir() argument
832 struct super_block *sb = dir->i_sb; in exfat_mkdir()
841 err = exfat_add_entry(dir, dentry->d_name.name, &cdir, TYPE_DIR, in exfat_mkdir()
847 inode_inc_iversion(dir); in exfat_mkdir()
848 dir->i_ctime = dir->i_mtime = current_time(dir); in exfat_mkdir()
849 if (IS_DIRSYNC(dir)) in exfat_mkdir()
850 exfat_sync_inode(dir); in exfat_mkdir()
852 mark_inode_dirty(dir); in exfat_mkdir()
853 inc_nlink(dir); in exfat_mkdir()
888 while (clu.dir != EXFAT_EOF_CLUSTER) { in exfat_check_dir_empty()
906 clu.dir++; in exfat_check_dir_empty()
908 clu.dir = EXFAT_EOF_CLUSTER; in exfat_check_dir_empty()
910 if (exfat_get_next_cluster(sb, &(clu.dir))) in exfat_check_dir_empty()
918 static int exfat_rmdir(struct inode *dir, struct dentry *dentry) in exfat_rmdir() argument
932 exfat_chain_dup(&cdir, &ei->dir); in exfat_rmdir()
935 if (ei->dir.dir == DIR_DELETED) { in exfat_rmdir()
968 err = exfat_remove_entries(dir, &cdir, entry, 0, num_entries); in exfat_rmdir()
973 ei->dir.dir = DIR_DELETED; in exfat_rmdir()
976 inode_inc_iversion(dir); in exfat_rmdir()
977 dir->i_mtime = dir->i_atime = current_time(dir); in exfat_rmdir()
978 exfat_truncate_atime(&dir->i_atime); in exfat_rmdir()
979 if (IS_DIRSYNC(dir)) in exfat_rmdir()
980 exfat_sync_inode(dir); in exfat_rmdir()
982 mark_inode_dirty(dir); in exfat_rmdir()
983 drop_nlink(dir); in exfat_rmdir()
989 exfat_d_version_set(dentry, inode_query_iversion(dir)); in exfat_rmdir()
1147 exfat_chain_set(&ei->dir, p_newdir->dir, p_newdir->size, in exfat_move_file()
1167 if (unlikely(parent_ei->flags != ei->dir.flags || in exfat_update_parent_info()
1168 parent_isize != EXFAT_CLU_TO_B(ei->dir.size, sbi) || in exfat_update_parent_info()
1169 parent_ei->start_clu != ei->dir.dir)) { in exfat_update_parent_info()
1170 exfat_chain_set(&ei->dir, parent_ei->start_clu, in exfat_update_parent_info()
1201 if (ei->dir.dir == DIR_DELETED) { in __exfat_rename()
1208 exfat_chain_dup(&olddir, &ei->dir); in __exfat_rename()
1223 if (new_ei->dir.dir == DIR_DELETED) { in __exfat_rename()
1230 p_dir = &(new_ei->dir); in __exfat_rename()
1243 new_clu.dir = new_ei->start_clu; in __exfat_rename()
1263 if (olddir.dir == newdir.dir) in __exfat_rename()
1314 new_ei->dir.dir = DIR_DELETED; in __exfat_rename()
1355 i_pos = ((loff_t)EXFAT_I(old_inode)->dir.dir << 32) | in exfat_rename()