Lines Matching +full:async +full:- +full:prefix
1 // SPDX-License-Identifier: GPL-2.0
5 * Copyright (c) 2020-2021 Huawei Device Co., Ltd.
84 struct hmdfs_peer *conn = info->conn; in hmdfs_xattr_remote_get()
90 return -ENOMEM; in hmdfs_xattr_remote_get()
104 err = -EOPNOTSUPP; in hmdfs_xattr_merge_get()
122 return -EOPNOTSUPP; in hmdfs_xattr_get()
125 return -EOPNOTSUPP; in hmdfs_xattr_get()
130 if (info->inode_type == HMDFS_LAYER_OTHER_LOCAL) in hmdfs_xattr_get()
132 else if (info->inode_type == HMDFS_LAYER_OTHER_REMOTE) in hmdfs_xattr_get()
134 else if (info->inode_type == HMDFS_LAYER_OTHER_MERGE || in hmdfs_xattr_get()
135 info->inode_type == HMDFS_LAYER_OTHER_MERGE_CLOUD) in hmdfs_xattr_get()
138 res = -EOPNOTSUPP; in hmdfs_xattr_get()
140 if (res == -ERANGE && r_size != size) { in hmdfs_xattr_get()
143 res = -E2BIG; in hmdfs_xattr_get()
174 struct hmdfs_peer *conn = info->conn; in hmdfs_xattr_remote_set()
180 return -ENOMEM; in hmdfs_xattr_remote_set()
194 err = -EOPNOTSUPP; in hmdfs_xattr_merge_set()
211 return -EOPNOTSUPP; in hmdfs_xattr_set()
215 return -E2BIG; in hmdfs_xattr_set()
218 if (info->inode_type == HMDFS_LAYER_OTHER_LOCAL) in hmdfs_xattr_set()
220 else if (info->inode_type == HMDFS_LAYER_OTHER_REMOTE) in hmdfs_xattr_set()
222 else if (info->inode_type == HMDFS_LAYER_OTHER_MERGE || in hmdfs_xattr_set()
223 info->inode_type == HMDFS_LAYER_OTHER_MERGE_CLOUD) in hmdfs_xattr_set()
226 return -EOPNOTSUPP; in hmdfs_xattr_set()
230 .prefix = "", /* catch all */
255 call_rcu(&inode->i_rcu, i_callback); in hmdfs_destroy_inode()
262 truncate_inode_pages(&inode->i_data, 0); in hmdfs_evict_inode()
264 if (info->inode_type == HMDFS_LAYER_FIRST_DEVICE || in hmdfs_evict_inode()
265 info->inode_type == HMDFS_LAYER_SECOND_REMOTE) in hmdfs_evict_inode()
267 if (info->inode_type == HMDFS_LAYER_ZERO || in hmdfs_evict_inode()
268 info->inode_type == HMDFS_LAYER_OTHER_LOCAL || in hmdfs_evict_inode()
269 info->inode_type == HMDFS_LAYER_SECOND_LOCAL) { in hmdfs_evict_inode()
270 iput(info->lower_inode); in hmdfs_evict_inode()
271 info->lower_inode = NULL; in hmdfs_evict_inode()
278 struct super_block *lower_sb = sbi->lower_sb; in hmdfs_put_super()
280 hmdfs_info("local_dst is %s, local_src is %s", sbi->local_dst, in hmdfs_put_super()
281 sbi->local_src); in hmdfs_put_super()
289 atomic_dec(&lower_sb->s_active); in hmdfs_put_super()
290 put_cred(sbi->cred); in hmdfs_put_super()
291 if (sbi->system_cred) in hmdfs_put_super()
292 put_cred(sbi->system_cred); in hmdfs_put_super()
294 kfree(sbi->local_src); in hmdfs_put_super()
295 kfree(sbi->local_dst); in hmdfs_put_super()
296 kfree(sbi->real_dst); in hmdfs_put_super()
297 kfree(sbi->cache_dir); in hmdfs_put_super()
298 kfree(sbi->cloud_dir); in hmdfs_put_super()
299 kfifo_free(&sbi->notify_fifo); in hmdfs_put_super()
300 sb->s_fs_info = NULL; in hmdfs_put_super()
301 sbi->lower_sb = NULL; in hmdfs_put_super()
304 hmdfs_free_sb_seq(sbi->seq); in hmdfs_put_super()
305 kfree(sbi->s_server_statis); in hmdfs_put_super()
306 kfree(sbi->s_client_statis); in hmdfs_put_super()
317 INIT_LIST_HEAD(&gi->wb_list); in hmdfs_alloc_inode()
318 init_rwsem(&gi->wpage_sem); in hmdfs_alloc_inode()
319 gi->getattr_isize = HMDFS_STALE_REMOTE_ISIZE; in hmdfs_alloc_inode()
320 atomic64_set(&gi->write_counter, 0); in hmdfs_alloc_inode()
321 gi->fid.id = HMDFS_INODE_INVALID_FILE_ID; in hmdfs_alloc_inode()
322 spin_lock_init(&gi->fid_lock); in hmdfs_alloc_inode()
323 INIT_LIST_HEAD(&gi->wr_opened_node); in hmdfs_alloc_inode()
324 atomic_set(&gi->wr_opened_cnt, 0); in hmdfs_alloc_inode()
325 init_waitqueue_head(&gi->fid_wq); in hmdfs_alloc_inode()
326 INIT_LIST_HEAD(&gi->stash_node); in hmdfs_alloc_inode()
327 spin_lock_init(&gi->stash_lock); in hmdfs_alloc_inode()
328 return &gi->vfs_inode; in hmdfs_alloc_inode()
338 struct hmdfs_sb_info *sbi = hmdfs_sb(dentry->d_inode->i_sb); in hmdfs_remote_statfs()
340 dir_path = hmdfs_get_dentry_relative_path(dentry->d_parent); in hmdfs_remote_statfs()
342 error = -EACCES; in hmdfs_remote_statfs()
346 name_path = hmdfs_connect_path(dir_path, dentry->d_name.name); in hmdfs_remote_statfs()
348 error = -EACCES; in hmdfs_remote_statfs()
351 mutex_lock(&sbi->connections.node_lock); in hmdfs_remote_statfs()
352 list_for_each_entry(con, &sbi->connections.node_list, list) { in hmdfs_remote_statfs()
353 if (con->status == NODE_STAT_ONLINE) { in hmdfs_remote_statfs()
355 mutex_unlock(&sbi->connections.node_lock); in hmdfs_remote_statfs()
357 con->device_id); in hmdfs_remote_statfs()
362 mutex_lock(&sbi->connections.node_lock); in hmdfs_remote_statfs()
365 mutex_unlock(&sbi->connections.node_lock); in hmdfs_remote_statfs()
377 struct hmdfs_inode_info *info = hmdfs_i(dentry->d_inode); in hmdfs_statfs()
378 struct super_block *sb = d_inode(dentry)->i_sb; in hmdfs_statfs()
379 struct hmdfs_sb_info *sbi = sb->s_fs_info; in hmdfs_statfs()
381 trace_hmdfs_statfs(dentry, info->inode_type); in hmdfs_statfs()
384 (info->inode_type == HMDFS_LAYER_SECOND_REMOTE)) { in hmdfs_statfs()
385 err = kern_path(sbi->local_src, 0, &lower_path); in hmdfs_statfs()
390 } else if (!IS_ERR_OR_NULL(info->lower_inode)) { in hmdfs_statfs()
398 buf->f_type = HMDFS_SUPER_MAGIC; in hmdfs_statfs()
405 struct hmdfs_sb_info *sbi = hmdfs_sb(root->d_sb); in hmdfs_show_options()
407 if (sbi->s_case_sensitive) in hmdfs_show_options()
412 if (sbi->s_merge_switch) in hmdfs_show_options()
417 seq_printf(m, ",ra_pages=%lu", root->d_sb->s_bdi->ra_pages); in hmdfs_show_options()
418 seq_printf(m, ",user_id=%u", sbi->user_id); in hmdfs_show_options()
420 if (sbi->cache_dir) in hmdfs_show_options()
421 seq_printf(m, ",cache_dir=%s", sbi->cache_dir); in hmdfs_show_options()
422 if (sbi->real_dst) in hmdfs_show_options()
423 seq_printf(m, ",real_dst=%s", sbi->real_dst); in hmdfs_show_options()
424 if (sbi->cloud_dir) in hmdfs_show_options()
425 seq_printf(m, ",cloud_dir=%s", sbi->cloud_dir); in hmdfs_show_options()
427 seq_printf(m, ",%soffline_stash", sbi->s_offline_stash ? "" : "no_"); in hmdfs_show_options()
428 seq_printf(m, ",%sdentry_cache", sbi->s_dentry_cache ? "" : "no_"); in hmdfs_show_options()
447 spin_lock(&sbi->hsi.list_lock); in hmdfs_sync_fs()
448 if (!sbi->hsi.is_executing) { in hmdfs_sync_fs()
449 sbi->hsi.is_executing = true; in hmdfs_sync_fs()
451 spin_unlock(&sbi->hsi.list_lock); in hmdfs_sync_fs()
454 list_add_tail(&item.list, &sbi->hsi.wait_list); in hmdfs_sync_fs()
455 spin_unlock(&sbi->hsi.list_lock); in hmdfs_sync_fs()
465 * during the waiting period we must protect @sbi->remote_syncfs_count in hmdfs_sync_fs()
466 * and @sbi->remote_syncfs_ret from concurrent executing. in hmdfs_sync_fs()
469 spin_lock(&sbi->hsi.v_lock); in hmdfs_sync_fs()
470 sbi->hsi.version++; in hmdfs_sync_fs()
472 * Attention: We put @sbi->hsi.remote_ret and @sbi->hsi.wait_count in hmdfs_sync_fs()
474 * by out-of-order execution: in hmdfs_sync_fs()
477 * sbi->hsi.remote_ret = 0; in hmdfs_sync_fs()
478 * atomic_set(&sbi->hsi.wait_count, 0); in hmdfs_sync_fs()
481 * sbi->hsi.remote_ret = resp->ret_code in hmdfs_sync_fs()
482 * atomic_dec(&sbi->hsi.wait_count); in hmdfs_sync_fs()
488 * @sbi->hsi.remote_ret and @sbi->hsi.wait_count can be assigned in hmdfs_sync_fs()
492 sbi->hsi.remote_ret = 0; in hmdfs_sync_fs()
493 atomic_set(&sbi->hsi.wait_count, 0); in hmdfs_sync_fs()
494 spin_unlock(&sbi->hsi.v_lock); in hmdfs_sync_fs()
496 mutex_lock(&sbi->connections.node_lock); in hmdfs_sync_fs()
497 list_for_each_entry(con, &sbi->connections.node_list, list) { in hmdfs_sync_fs()
503 if (con->status != NODE_STAT_ONLINE) in hmdfs_sync_fs()
507 mutex_unlock(&sbi->connections.node_lock); in hmdfs_sync_fs()
515 * after getting @con->sb_dirty_count. in hmdfs_sync_fs()
517 con->old_sb_dirty_count = atomic64_read(&con->sb_dirty_count); in hmdfs_sync_fs()
520 if (!con->old_sb_dirty_count) { in hmdfs_sync_fs()
522 mutex_lock(&sbi->connections.node_lock); in hmdfs_sync_fs()
529 err, con->device_id); in hmdfs_sync_fs()
530 sbi->hsi.remote_ret = err; in hmdfs_sync_fs()
532 mutex_lock(&sbi->connections.node_lock); in hmdfs_sync_fs()
536 atomic_inc(&sbi->hsi.wait_count); in hmdfs_sync_fs()
539 mutex_lock(&sbi->connections.node_lock); in hmdfs_sync_fs()
541 mutex_unlock(&sbi->connections.node_lock); in hmdfs_sync_fs()
544 * Async work in background will make sure @sbi->remote_syncfs_count in hmdfs_sync_fs()
548 sbi->hsi.wq, atomic_read(&sbi->hsi.wait_count) == 0); in hmdfs_sync_fs()
551 err = -EINTR; in hmdfs_sync_fs()
554 if (!err && sbi->hsi.remote_ret) in hmdfs_sync_fs()
555 err = sbi->hsi.remote_ret; in hmdfs_sync_fs()
558 list_for_each_entry_safe(entry, tmp, &sbi->hsi.pending_list, list) { in hmdfs_sync_fs()
559 entry->need_abort = true; in hmdfs_sync_fs()
560 complete(&entry->done); in hmdfs_sync_fs()
562 INIT_LIST_HEAD(&sbi->hsi.pending_list); in hmdfs_sync_fs()
565 spin_lock(&sbi->hsi.list_lock); in hmdfs_sync_fs()
566 if (list_empty(&sbi->hsi.wait_list)) { in hmdfs_sync_fs()
567 sbi->hsi.is_executing = false; in hmdfs_sync_fs()
569 entry = list_last_entry(&sbi->hsi.wait_list, struct syncfs_item, in hmdfs_sync_fs()
571 list_del_init(&entry->list); in hmdfs_sync_fs()
572 list_splice_init(&sbi->hsi.wait_list, &sbi->hsi.pending_list); in hmdfs_sync_fs()
573 entry->need_abort = false; in hmdfs_sync_fs()
574 complete(&entry->done); in hmdfs_sync_fs()
576 spin_unlock(&sbi->hsi.list_lock); in hmdfs_sync_fs()
579 trace_hmdfs_syncfs_exit(sbi, atomic_read(&sbi->hsi.wait_count), in hmdfs_sync_fs()
601 inode_init_once(&i->vfs_inode); in init_once()
606 int err = -ENOMEM; in hmdfs_init_caches()
657 res = (res << 5) - res + (uint64_t)(c); in path_hash()
684 memset(sbi->s_cmd_timeout, 0xff, sizeof(sbi->s_cmd_timeout)); in hmdfs_init_cmd_timeout()
712 ret = kfifo_alloc(&sbi->notify_fifo, PAGE_SIZE, GFP_KERNEL); in hmdfs_init_sbi()
720 sbi->s_server_statis = in hmdfs_init_sbi()
721 kzalloc(sizeof(*sbi->s_server_statis) * F_SIZE, GFP_KERNEL); in hmdfs_init_sbi()
722 sbi->s_client_statis = in hmdfs_init_sbi()
723 kzalloc(sizeof(*sbi->s_client_statis) * F_SIZE, GFP_KERNEL); in hmdfs_init_sbi()
724 if (!sbi->s_server_statis || !sbi->s_client_statis) { in hmdfs_init_sbi()
725 ret = -ENOMEM; in hmdfs_init_sbi()
734 sbi->seq = ret; in hmdfs_init_sbi()
737 spin_lock_init(&sbi->notify_fifo_lock); in hmdfs_init_sbi()
738 mutex_init(&sbi->cmd_handler_mutex); in hmdfs_init_sbi()
739 sbi->s_case_sensitive = false; in hmdfs_init_sbi()
740 sbi->s_features = HMDFS_FEATURE_READPAGES | in hmdfs_init_sbi()
743 sbi->s_merge_switch = false; in hmdfs_init_sbi()
744 sbi->s_cloud_disk_switch = false; in hmdfs_init_sbi()
745 sbi->dcache_threshold = DEFAULT_DCACHE_THRESHOLD; in hmdfs_init_sbi()
746 sbi->dcache_precision = DEFAULT_DCACHE_PRECISION; in hmdfs_init_sbi()
747 sbi->dcache_timeout = DEFAULT_DCACHE_TIMEOUT; in hmdfs_init_sbi()
748 sbi->write_cache_timeout = DEFAULT_WRITE_CACHE_TIMEOUT; in hmdfs_init_sbi()
750 sbi->async_cb_delay = HMDFS_NODE_EVT_CB_DELAY; in hmdfs_init_sbi()
751 sbi->async_req_max_active = DEFAULT_SRV_REQ_MAX_ACTIVE; in hmdfs_init_sbi()
752 sbi->s_offline_stash = true; in hmdfs_init_sbi()
753 sbi->s_dentry_cache = true; in hmdfs_init_sbi()
754 sbi->wb_timeout_ms = HMDFS_DEF_WB_TIMEOUT_MS; in hmdfs_init_sbi()
755 sbi->s_readpages_nr = HMDFS_READPAGES_NR_DEF; in hmdfs_init_sbi()
757 atomic_set(&sbi->connections.conn_seq, 0); in hmdfs_init_sbi()
758 mutex_init(&sbi->connections.node_lock); in hmdfs_init_sbi()
759 INIT_LIST_HEAD(&sbi->connections.node_list); in hmdfs_init_sbi()
764 init_waitqueue_head(&sbi->async_readdir_wq); in hmdfs_init_sbi()
765 INIT_LIST_HEAD(&sbi->async_readdir_msg_list); in hmdfs_init_sbi()
766 INIT_LIST_HEAD(&sbi->async_readdir_work_list); in hmdfs_init_sbi()
767 spin_lock_init(&sbi->async_readdir_msg_lock); in hmdfs_init_sbi()
768 spin_lock_init(&sbi->async_readdir_work_lock); in hmdfs_init_sbi()
784 sbi->s_client_statis[cmd].delay_resp_cnt++; in hmdfs_client_resp_statis()
787 sbi->s_client_statis[cmd].timeout_cnt++; in hmdfs_client_resp_statis()
790 duration = end - start; in hmdfs_client_resp_statis()
791 sbi->s_client_statis[cmd].total += duration; in hmdfs_client_resp_statis()
792 sbi->s_client_statis[cmd].resp_cnt++; in hmdfs_client_resp_statis()
793 if (sbi->s_client_statis[cmd].max < duration) in hmdfs_client_resp_statis()
794 sbi->s_client_statis[cmd].max = duration; in hmdfs_client_resp_statis()
807 sbi->real_dst = kstrdup(sbi->local_dst, GFP_KERNEL); in hmdfs_update_dst()
808 if (!sbi->real_dst) { in hmdfs_update_dst()
809 err = -ENOMEM; in hmdfs_update_dst()
812 kfree(sbi->local_dst); in hmdfs_update_dst()
813 sbi->local_dst = NULL; in hmdfs_update_dst()
815 len = strlen(sbi->real_dst) + strlen(path_local) + 1; in hmdfs_update_dst()
817 err = -EINVAL; in hmdfs_update_dst()
820 sbi->local_dst = kmalloc(len, GFP_KERNEL); in hmdfs_update_dst()
821 if (!sbi->local_dst) { in hmdfs_update_dst()
822 err = -ENOMEM; in hmdfs_update_dst()
825 snprintf(sbi->local_dst, strlen(sbi->real_dst) + strlen(path_local) + 1, in hmdfs_update_dst()
826 "%s%s", sbi->real_dst, path_local); in hmdfs_update_dst()
835 * |--------|-----------------|-------|
849 now &= (1ULL << HMDFS_BOOT_COOKIE_RAND_SHIFT) - 1; in hmdfs_gen_boot_cookie()
858 const char *dev_name = priv->dev_name; in hmdfs_fill_super()
859 const char *raw_data = priv->raw_data; in hmdfs_fill_super()
869 return -EINVAL; in hmdfs_fill_super()
873 err = -ENOMEM; in hmdfs_fill_super()
879 sbi->sb = sb; in hmdfs_fill_super()
884 sb->s_fs_info = sbi; in hmdfs_fill_super()
885 sb->s_magic = HMDFS_SUPER_MAGIC; in hmdfs_fill_super()
886 sb->s_xattr = hmdfs_xattr_handlers; in hmdfs_fill_super()
887 sb->s_op = &hmdfs_sops; in hmdfs_fill_super()
889 sbi->boot_cookie = hmdfs_gen_boot_cookie(); in hmdfs_fill_super()
903 scnprintf(ctrl_path, CTRL_PATH_MAX_LEN, "%u", sb->s_dev); in hmdfs_fill_super()
904 hmdfs_debug("s_dev %u", sb->s_dev); in hmdfs_fill_super()
920 lower_sb = lower_path.dentry->d_sb; in hmdfs_fill_super()
921 atomic_inc(&lower_sb->s_active); in hmdfs_fill_super()
922 sbi->lower_sb = lower_sb; in hmdfs_fill_super()
923 sbi->local_src = get_full_path(&lower_path); in hmdfs_fill_super()
924 if (!sbi->local_src) { in hmdfs_fill_super()
929 sb->s_time_gran = lower_sb->s_time_gran; in hmdfs_fill_super()
930 sb->s_maxbytes = lower_sb->s_maxbytes; in hmdfs_fill_super()
931 sb->s_stack_depth = lower_sb->s_stack_depth + 1; in hmdfs_fill_super()
932 if (sb->s_stack_depth > FILESYSTEM_MAX_STACK_DEPTH) { in hmdfs_fill_super()
934 err = -EINVAL; in hmdfs_fill_super()
943 sb->s_root = root_dentry = d_make_root(root_inode); in hmdfs_fill_super()
945 err = -ENOMEM; in hmdfs_fill_super()
948 if (sbi->s_cloud_disk_switch) in hmdfs_fill_super()
955 sbi->cred = get_cred(current_cred()); in hmdfs_fill_super()
956 INIT_LIST_HEAD(&sbi->client_cache); in hmdfs_fill_super()
957 INIT_LIST_HEAD(&sbi->server_cache); in hmdfs_fill_super()
958 INIT_LIST_HEAD(&sbi->to_delete); in hmdfs_fill_super()
959 mutex_init(&sbi->cache_list_lock); in hmdfs_fill_super()
963 spin_lock_init(&sbi->hsi.v_lock); in hmdfs_fill_super()
964 init_waitqueue_head(&sbi->hsi.wq); in hmdfs_fill_super()
965 sbi->hsi.version = 0; in hmdfs_fill_super()
966 sbi->hsi.is_executing = false; in hmdfs_fill_super()
967 INIT_LIST_HEAD(&sbi->hsi.wait_list); in hmdfs_fill_super()
968 INIT_LIST_HEAD(&sbi->hsi.pending_list); in hmdfs_fill_super()
969 spin_lock_init(&sbi->hsi.list_lock); in hmdfs_fill_super()
973 dput(sb->s_root); in hmdfs_fill_super()
974 sb->s_root = NULL; in hmdfs_fill_super()
976 atomic_dec(&lower_sb->s_active); in hmdfs_fill_super()
983 sb->s_fs_info = NULL; in hmdfs_fill_super()
988 kfifo_free(&sbi->notify_fifo); in hmdfs_fill_super()
989 hmdfs_free_sb_seq(sbi->seq); in hmdfs_fill_super()
990 kfree(sbi->local_src); in hmdfs_fill_super()
991 kfree(sbi->local_dst); in hmdfs_fill_super()
992 kfree(sbi->real_dst); in hmdfs_fill_super()
993 kfree(sbi->cache_dir); in hmdfs_fill_super()
994 kfree(sbi->cloud_dir); in hmdfs_fill_super()
995 kfree(sbi->s_server_statis); in hmdfs_fill_super()
996 kfree(sbi->s_client_statis); in hmdfs_fill_super()
1013 return ERR_PTR(-EINVAL); in hmdfs_mount()
1028 spin_lock(&sbi->async_readdir_work_lock); in hmdfs_cancel_async_readdir()
1029 list_for_each_entry_safe(rw, tmp, &sbi->async_readdir_work_list, head) { in hmdfs_cancel_async_readdir()
1030 if (cancel_delayed_work(&rw->dwork)) in hmdfs_cancel_async_readdir()
1031 list_move(&rw->head, &del_work); in hmdfs_cancel_async_readdir()
1033 spin_unlock(&sbi->async_readdir_work_lock); in hmdfs_cancel_async_readdir()
1036 dput(rw->dentry); in hmdfs_cancel_async_readdir()
1037 peer_put(rw->con); in hmdfs_cancel_async_readdir()
1041 /* wake up async readdir that are waiting for remote */ in hmdfs_cancel_async_readdir()
1042 spin_lock(&sbi->async_readdir_msg_lock); in hmdfs_cancel_async_readdir()
1043 sbi->async_readdir_prohibit = true; in hmdfs_cancel_async_readdir()
1044 list_for_each_entry(msg_wq, &sbi->async_readdir_msg_list, async_msg) in hmdfs_cancel_async_readdir()
1045 hmdfs_response_wakeup(msg_wq, -EINTR, 0, NULL); in hmdfs_cancel_async_readdir()
1046 spin_unlock(&sbi->async_readdir_msg_lock); in hmdfs_cancel_async_readdir()
1048 /* wait for all async readdir to finish */ in hmdfs_cancel_async_readdir()
1049 if (!list_empty(&sbi->async_readdir_work_list)) in hmdfs_cancel_async_readdir()
1050 wait_event_interruptible_timeout(sbi->async_readdir_wq, in hmdfs_cancel_async_readdir()
1051 (list_empty(&sbi->async_readdir_work_list)), HZ); in hmdfs_cancel_async_readdir()
1053 WARN_ON(!(list_empty(&sbi->async_readdir_work_list))); in hmdfs_cancel_async_readdir()
1061 * async readdir is holding ref for dentry, not for vfsmount. Thus in hmdfs_kill_super()
1063 * if async readdir is not done. in hmdfs_kill_super()