--- y/fs/exfat/dir.c +++ d/fs/exfat/dir.c @@ -225,11 +225,12 @@ static int exfat_iterate(struct file *fi int err = 0, fake_offset = 0; exfat_init_namebuf(nb); - mutex_lock(&EXFAT_SB(sb)->s_lock); cpos = ctx->pos; if (!dir_emit_dots(file, ctx)) - goto unlock; + goto out_unlocked; + + mutex_lock(&EXFAT_SB(sb)->s_lock); if (ctx->pos == ITER_POS_FILLED_DOTS) { cpos = 0;