	.file	"extr_journal.c_ocfs2_journal_shutdown.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ocfs2_journal_shutdown
	.type	ocfs2_journal_shutdown, @function
ocfs2_journal_shutdown:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	test	rdi, rdi
	sete	dil
	movzx	edi, dil
	call	BUG_ON@PLT
	mov	rbx, QWORD PTR 0[rbp]
	test	rbx, rbx
	je	.L11
	mov	r12, QWORD PTR 32[rbx]
	mov	rax, QWORD PTR OCFS2_JOURNAL_LOADED[rip]
	cmp	QWORD PTR [rbx], rax
	je	.L23
.L2:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rdi, r12
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	iput@PLT
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	mov	rdi, r12
	call	igrab@PLT
	test	eax, eax
	je	.L24
.L3:
	mov	rax, QWORD PTR 0[rbp]
	lea	rdi, 24[rax]
	call	atomic_read@PLT
	mov	rdi, rax
	call	trace_ocfs2_journal_shutdown@PLT
	mov	rax, QWORD PTR OCFS2_JOURNAL_IN_SHUTDOWN[rip]
	mov	rdi, QWORD PTR 8[rbp]
	mov	QWORD PTR [rbx], rax
	test	rdi, rdi
	je	.L4
	call	trace_ocfs2_journal_shutdown_wait@PLT
	mov	rdi, QWORD PTR 8[rbp]
	call	kthread_stop@PLT
	mov	QWORD PTR 8[rbp], 0
.L4:
	mov	rax, QWORD PTR 0[rbp]
	lea	rdi, 24[rax]
	call	atomic_read@PLT
	xor	edi, edi
	test	rax, rax
	setne	dil
	call	BUG_ON@PLT
	mov	rdi, rbp
	call	ocfs2_mount_local@PLT
	mov	rdi, QWORD PTR 16[rbx]
	test	rax, rax
	jne	.L5
	call	jbd2_journal_destroy@PLT
	test	eax, eax
	jne	.L7
.L6:
	xor	edx, edx
	xor	esi, esi
	mov	rdi, rbp
	call	ocfs2_journal_toggle_dirty@PLT
	test	eax, eax
	js	.L25
.L7:
	mov	QWORD PTR 16[rbx], 0
	mov	rdi, r12
	call	OCFS2_I@PLT
	mov	esi, 1
	mov	rdi, r12
	sub	DWORD PTR [rax], 1
	call	ocfs2_inode_unlock@PLT
	mov	rdi, QWORD PTR 8[rbx]
	call	brelse@PLT
	mov	rax, QWORD PTR OCFS2_JOURNAL_FREE[rip]
	mov	QWORD PTR 8[rbx], 0
	mov	QWORD PTR [rbx], rax
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L5:
	call	jbd2_journal_lock_updates@PLT
	mov	rdi, QWORD PTR 16[rbx]
	call	jbd2_journal_flush@PLT
	mov	rdi, QWORD PTR 16[rbx]
	mov	r13d, eax
	call	jbd2_journal_unlock_updates@PLT
	test	r13d, r13d
	js	.L26
	mov	rdi, QWORD PTR 16[rbx]
	call	jbd2_journal_destroy@PLT
	or	eax, r13d
	jne	.L7
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L24:
	call	BUG@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L11:
	xor	r12d, r12d
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L26:
	mov	edi, r13d
	call	mlog_errno@PLT
	mov	rdi, QWORD PTR 16[rbx]
	call	jbd2_journal_destroy@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L25:
	mov	edi, eax
	call	mlog_errno@PLT
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	ocfs2_journal_shutdown, .-ocfs2_journal_shutdown
	.comm	OCFS2_JOURNAL_LOADED,8,8
	.comm	OCFS2_JOURNAL_IN_SHUTDOWN,8,8
	.comm	OCFS2_JOURNAL_FREE,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_journal.c_ocfs2_journal_shutdown.c"
	.text
	.align	2
	.global	ocfs2_journal_shutdown
	.syntax unified
	.arm
	.fpu softvfp
	.type	ocfs2_journal_shutdown, %function
ocfs2_journal_shutdown:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	clz	r0, r0
	lsr	r0, r0, #5
	bl	BUG_ON
	ldr	r5, [r4]
	cmp	r5, #0
	moveq	r6, r5
	beq	.L2
	ldr	r3, .L27
	ldr	r2, [r5]
	ldr	r3, [r3]
	ldr	r6, [r5, #16]
	cmp	r2, r3
	beq	.L23
.L2:
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, lr}
	b	iput
.L23:
	mov	r0, r6
	bl	igrab
	cmp	r0, #0
	beq	.L24
.L3:
	ldr	r0, [r4]
	add	r0, r0, #12
	bl	atomic_read
	bl	trace_ocfs2_journal_shutdown
	ldr	r3, .L27+4
	ldr	r0, [r4, #4]
	ldr	r3, [r3]
	cmp	r0, #0
	str	r3, [r5]
	beq	.L4
	bl	trace_ocfs2_journal_shutdown_wait
	ldr	r0, [r4, #4]
	bl	kthread_stop
	mov	r3, #0
	str	r3, [r4, #4]
.L4:
	ldr	r0, [r4]
	add	r0, r0, #12
	bl	atomic_read
	subs	r0, r0, #0
	movne	r0, #1
	bl	BUG_ON
	mov	r0, r4
	bl	ocfs2_mount_local
	cmp	r0, #0
	ldr	r0, [r5, #8]
	bne	.L5
	bl	jbd2_journal_destroy
	cmp	r0, #0
	bne	.L7
.L6:
	mov	r2, #0
	mov	r0, r4
	mov	r1, r2
	bl	ocfs2_journal_toggle_dirty
	cmp	r0, #0
	blt	.L25
.L7:
	mov	r4, #0
	mov	r0, r6
	str	r4, [r5, #8]
	bl	OCFS2_I
	ldr	r3, [r0]
	mov	r1, #1
	sub	r3, r3, #1
	str	r3, [r0]
	mov	r0, r6
	bl	ocfs2_inode_unlock
	ldr	r0, [r5, #4]
	bl	brelse
	ldr	r3, .L27+8
	mov	r0, r6
	ldr	r3, [r3]
	str	r4, [r5, #4]
	str	r3, [r5]
	pop	{r4, r5, r6, r7, r8, lr}
	b	iput
.L5:
	bl	jbd2_journal_lock_updates
	ldr	r0, [r5, #8]
	bl	jbd2_journal_flush
	mov	r7, r0
	ldr	r0, [r5, #8]
	bl	jbd2_journal_unlock_updates
	cmp	r7, #0
	blt	.L26
	ldr	r0, [r5, #8]
	bl	jbd2_journal_destroy
	orrs	r3, r0, r7
	bne	.L7
	b	.L6
.L24:
	bl	BUG
	b	.L3
.L26:
	mov	r0, r7
	bl	mlog_errno
	ldr	r0, [r5, #8]
	bl	jbd2_journal_destroy
	b	.L7
.L25:
	bl	mlog_errno
	b	.L7
.L28:
	.align	2
.L27:
	.word	OCFS2_JOURNAL_LOADED
	.word	OCFS2_JOURNAL_IN_SHUTDOWN
	.word	OCFS2_JOURNAL_FREE
	.size	ocfs2_journal_shutdown, .-ocfs2_journal_shutdown
	.comm	OCFS2_JOURNAL_LOADED,4,4
	.comm	OCFS2_JOURNAL_IN_SHUTDOWN,4,4
	.comm	OCFS2_JOURNAL_FREE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
