Lines Matching refs:dir
245 while (clu.dir != EXFAT_EOF_CLUSTER) { in exfat_search_empty_slot()
261 clu.dir, clu.size, clu.flags); in exfat_search_empty_slot()
277 p_dir->dir, clu.dir); in exfat_search_empty_slot()
294 clu.dir++; in exfat_search_empty_slot()
296 clu.dir = EXFAT_EOF_CLUSTER; in exfat_search_empty_slot()
298 if (exfat_get_next_cluster(sb, &clu.dir)) in exfat_search_empty_slot()
374 if (exfat_zeroed_cluster(inode, clu.dir)) in exfat_find_empty_entry()
378 ei->start_clu = clu.dir; in exfat_find_empty_entry()
379 p_dir->dir = clu.dir; in exfat_find_empty_entry()
387 exfat_chain_cont_cluster(sb, p_dir->dir, p_dir->size); in exfat_find_empty_entry()
393 if (exfat_ent_set(sb, last_clu, clu.dir)) in exfat_find_empty_entry()
396 if (hint_femp.cur.dir == EXFAT_EOF_CLUSTER) in exfat_find_empty_entry()
397 exfat_chain_set(&hint_femp.cur, clu.dir, 0, clu.flags); in exfat_find_empty_entry()
474 const unsigned char *path, struct exfat_chain *dir, in exfat_resolve_path() argument
477 return __exfat_resolve_path(inode, path, dir, uni, 0); in exfat_resolve_path()
481 const unsigned char *path, struct exfat_chain *dir, in exfat_resolve_path_for_lookup() argument
484 return __exfat_resolve_path(inode, path, dir, uni, 1); in exfat_resolve_path_for_lookup()
489 return ((loff_t) info->dir.dir << 32) | (info->entry & 0xffffffff); in exfat_make_i_pos()
525 start_clu = clu.dir; in exfat_add_entry()
542 info->dir = *p_dir; in exfat_add_entry()
565 static int exfat_create(struct mnt_idmap *idmap, struct inode *dir, in exfat_create() argument
568 struct super_block *sb = dir->i_sb; in exfat_create()
577 err = exfat_add_entry(dir, dentry->d_name.name, &cdir, TYPE_FILE, in exfat_create()
582 inode_inc_iversion(dir); in exfat_create()
583 dir->i_mtime = inode_set_ctime_current(dir); in exfat_create()
584 if (IS_DIRSYNC(dir)) in exfat_create()
585 exfat_sync_inode(dir); in exfat_create()
587 mark_inode_dirty(dir); in exfat_create()
607 static int exfat_find(struct inode *dir, struct qstr *qname, in exfat_find() argument
613 struct super_block *sb = dir->i_sb; in exfat_find()
615 struct exfat_inode_info *ei = EXFAT_I(dir); in exfat_find()
625 ret = exfat_resolve_path_for_lookup(dir, qname->name, &cdir, &uni_name); in exfat_find()
630 if (ei->version != (inode_peek_iversion_raw(dir) & 0xffffffff)) { in exfat_find()
631 ei->hint_stat.clu = cdir.dir; in exfat_find()
633 ei->version = (inode_peek_iversion_raw(dir) & 0xffffffff); in exfat_find()
642 info->dir = cdir; in exfat_find()
647 cdir.dir = hint_opt.clu; in exfat_find()
688 i_size_read(dir), ei->dir.dir, ei->entry); in exfat_find()
709 static struct dentry *exfat_lookup(struct inode *dir, struct dentry *dentry, in exfat_lookup() argument
712 struct super_block *sb = dir->i_sb; in exfat_lookup()
721 err = exfat_find(dir, &dentry->d_name, &info); in exfat_lookup()
777 exfat_d_version_set(dentry, inode_query_iversion(dir)); in exfat_lookup()
786 static int exfat_unlink(struct inode *dir, struct dentry *dentry) in exfat_unlink() argument
790 struct super_block *sb = dir->i_sb; in exfat_unlink()
797 exfat_chain_dup(&cdir, &ei->dir); in exfat_unlink()
799 if (ei->dir.dir == DIR_DELETED) { in exfat_unlink()
821 if (exfat_remove_entries(dir, &cdir, entry, 0, num_entries)) { in exfat_unlink()
827 ei->dir.dir = DIR_DELETED; in exfat_unlink()
829 inode_inc_iversion(dir); in exfat_unlink()
830 dir->i_mtime = dir->i_atime = inode_set_ctime_current(dir); in exfat_unlink()
831 exfat_truncate_atime(&dir->i_atime); in exfat_unlink()
832 if (IS_DIRSYNC(dir)) in exfat_unlink()
833 exfat_sync_inode(dir); in exfat_unlink()
835 mark_inode_dirty(dir); in exfat_unlink()
841 exfat_d_version_set(dentry, inode_query_iversion(dir)); in exfat_unlink()
847 static int exfat_mkdir(struct mnt_idmap *idmap, struct inode *dir, in exfat_mkdir() argument
850 struct super_block *sb = dir->i_sb; in exfat_mkdir()
859 err = exfat_add_entry(dir, dentry->d_name.name, &cdir, TYPE_DIR, in exfat_mkdir()
864 inode_inc_iversion(dir); in exfat_mkdir()
865 dir->i_mtime = inode_set_ctime_current(dir); in exfat_mkdir()
866 if (IS_DIRSYNC(dir)) in exfat_mkdir()
867 exfat_sync_inode(dir); in exfat_mkdir()
869 mark_inode_dirty(dir); in exfat_mkdir()
870 inc_nlink(dir); in exfat_mkdir()
902 if (p_dir->dir == EXFAT_EOF_CLUSTER) in exfat_check_dir_empty()
907 while (clu.dir != EXFAT_EOF_CLUSTER) { in exfat_check_dir_empty()
925 clu.dir++; in exfat_check_dir_empty()
927 clu.dir = EXFAT_EOF_CLUSTER; in exfat_check_dir_empty()
929 if (exfat_get_next_cluster(sb, &(clu.dir))) in exfat_check_dir_empty()
937 static int exfat_rmdir(struct inode *dir, struct dentry *dentry) in exfat_rmdir() argument
950 exfat_chain_dup(&cdir, &ei->dir); in exfat_rmdir()
953 if (ei->dir.dir == DIR_DELETED) { in exfat_rmdir()
986 err = exfat_remove_entries(dir, &cdir, entry, 0, num_entries); in exfat_rmdir()
991 ei->dir.dir = DIR_DELETED; in exfat_rmdir()
993 inode_inc_iversion(dir); in exfat_rmdir()
994 dir->i_mtime = dir->i_atime = inode_set_ctime_current(dir); in exfat_rmdir()
995 exfat_truncate_atime(&dir->i_atime); in exfat_rmdir()
996 if (IS_DIRSYNC(dir)) in exfat_rmdir()
997 exfat_sync_inode(dir); in exfat_rmdir()
999 mark_inode_dirty(dir); in exfat_rmdir()
1000 drop_nlink(dir); in exfat_rmdir()
1006 exfat_d_version_set(dentry, inode_query_iversion(dir)); in exfat_rmdir()
1077 ei->dir = *p_dir; in exfat_rename_file()
1158 exfat_chain_set(&ei->dir, p_newdir->dir, p_newdir->size, in exfat_move_file()
1190 if (ei->dir.dir == DIR_DELETED) { in __exfat_rename()
1205 if (new_ei->dir.dir == DIR_DELETED) { in __exfat_rename()
1210 p_dir = &(new_ei->dir); in __exfat_rename()
1223 new_clu.dir = new_ei->start_clu; in __exfat_rename()
1243 if (olddir.dir == newdir.dir) in __exfat_rename()
1295 new_ei->dir.dir = DIR_DELETED; in __exfat_rename()
1336 i_pos = ((loff_t)EXFAT_I(old_inode)->dir.dir << 32) | in exfat_rename()