linux-stable/include
Jan Kara d4beaf4ab5 jbd: Fix assertion failure in fs/jbd/checkpoint.c
Before we start committing a transaction, we call
__journal_clean_checkpoint_list() to cleanup transaction's written-back
buffers.

If this call happens to remove all of them (and there were already some
buffers), __journal_remove_checkpoint() will decide to free the transaction
because it isn't (yet) a committing transaction and soon we fail some
assertion - the transaction really isn't ready to be freed :).

We change the check in __journal_remove_checkpoint() to free only a
transaction in T_FINISHED state.  The locking there is subtle though (as
everywhere in JBD ;().  We use j_list_lock to protect the check and a
subsequent call to __journal_drop_transaction() and do the same in the end
of journal_commit_transaction() which is the only place where a transaction
can get to T_FINISHED state.

Probably I'm too paranoid here and such locking is not really necessary -
checkpoint lists are processed only from log_do_checkpoint() where a
transaction must be already committed to be processed or from
__journal_clean_checkpoint_list() where kjournald itself calls it and thus
transaction cannot change state either.  Better be safe if something
changes in future...

Signed-off-by: Jan Kara <jack@suse.cz>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-12-05 09:21:20 -08:00
..
acpi Pull cpuidle into release branch 2007-11-20 01:18:37 -05:00
asm-alpha
asm-arm Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm 2007-11-30 08:11:18 -08:00
asm-avr32 [AVR32] Add missing bit in PCCR sysreg 2007-11-15 13:47:20 +01:00
asm-blackfin Blackfin SPI driver: move hard coded pin_req to board file 2007-12-05 09:21:20 -08:00
asm-cris CRIS tlb.h should include linux/pagemap.h 2007-11-14 18:45:47 -08:00
asm-frv frv: Remove bogus NO_IRQ = -1 define 2007-11-09 15:11:44 -08:00
asm-generic sched: fix RLIMIT_CPU comment 2007-11-26 21:21:49 +01:00
asm-h8300
asm-ia64 ACPI: Set max_cstate to 1 for early Opterons. 2007-11-26 20:42:19 +01:00
asm-m32r m32r: Update sys_rt_sigsuspend 2007-11-28 01:24:04 +09:00
asm-m68k
asm-m68knommu m68knommu: fix pread/pwrite defines 2007-11-05 15:12:33 -08:00
asm-mips [MIPS] Fix use of smp_processor_id() in preemptible code. 2007-12-01 00:39:37 +00:00
asm-parisc
asm-powerpc Revert "[POWERPC] Fix RTAS os-term usage on kernel panic" 2007-12-03 09:39:45 +11:00
asm-ppc
asm-s390 [S390] Fix irq tracing and lockdep_sys_exit calls. 2007-11-20 11:13:45 +01:00
asm-sh sh: Fix copy_{to,from}_user_page() with cache disabled. 2007-11-19 12:55:51 +09:00
asm-sh64 sh: remove PTRACE_O_TRACESYSGOOD from asm/ptrace.h 2007-11-07 11:13:54 +09:00
asm-sparc
asm-sparc64 [SPARC64]: Use "is_power_of_2" macro for simplicity. 2007-11-07 02:24:33 -08:00
asm-um uml: update address space affected by pud_clear 2007-11-14 18:45:37 -08:00
asm-v850
asm-x86 x86: disable hpet on shutdown 2007-12-03 17:17:10 +01:00
asm-xtensa
crypto
keys
linux jbd: Fix assertion failure in fs/jbd/checkpoint.c 2007-12-05 09:21:20 -08:00
math-emu
media
mtd
net SCTP: Fix build issues with SCTP AUTH. 2007-11-29 10:17:42 -05:00
pcmcia [AVR32] pcmcia ioaddr_t should be 32 bits on AVR32 2007-11-15 13:47:19 +01:00
rdma
rxrpc
scsi
sound [ALSA] version 1.0.15 2007-11-20 20:16:43 +01:00
video
xen
Kbuild