Lines Matching full:hsi
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()
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()
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()
530 sbi->hsi.remote_ret = err; in hmdfs_sync_fs()
536 atomic_inc(&sbi->hsi.wait_count); in hmdfs_sync_fs()
548 sbi->hsi.wq, atomic_read(&sbi->hsi.wait_count) == 0); 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()
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()
572 list_splice_init(&sbi->hsi.wait_list, &sbi->hsi.pending_list); 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()
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()