linux/fs/logfs
Prasad Joshi f06328d772 logfs: fix "Kernel BUG at readwrite.c:1193"
This happens when __logfs_create() tries to write a new inode to the disk
which is full.

__logfs_create() associates the transaction pointer with inode.  During
the logfs_write_inode() function call chain this transaction pointer is
moved from inode to page->private using function move_inode_to_page
(do_write_inode() -> inode_to_page() -> move_inode_to_page)

When the write inode fails, the transaction is aborted and iput is called
on the failed inode.  During delete_inode the same transaction pointer
associated with the page is getting used.  Thus causing kernel BUG.

The patch checks for error in write_inode() and restores the page->private
to NULL.

Addresses https://bugzilla.kernel.org/show_bug.cgi?id=20162

Signed-off-by: Prasad Joshi <prasadjoshi124@gmail.com>
Cc: Joern Engel <joern@logfs.org>
Cc: Florian Mickler <florian@mickler.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Maciej Rutecki <maciej.rutecki@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-12-22 19:43:33 -08:00
..
compr.c [LogFS] add new flash file system 2009-11-20 20:13:39 +01:00
dev_bdev.c logfs: fix a leak in get_sb 2010-10-29 04:16:48 -04:00
dev_mtd.c logfs: fix a leak in get_sb 2010-10-29 04:16:48 -04:00
dir.c new helper: ihold() 2010-10-25 21:26:11 -04:00
file.c logfs: kill BKL 2010-08-14 00:24:24 +02:00
gc.c logfs: handle powerfail on NAND flash 2010-05-07 19:38:40 +02:00
inode.c Make ->drop_inode() just return whether inode needs to be dropped 2010-08-09 16:48:35 -04:00
journal.c logfs: fix deadlock in logfs_get_wblocks, hold and wait on super->s_write_mutex 2010-12-22 19:43:33 -08:00
Kconfig [LogFS] add new flash file system 2009-11-20 20:13:39 +01:00
logfs_abi.h fix "seperate" typos in comments 2010-05-10 11:56:30 +02:00
logfs.h fs: logfs: Fix up MTD=y build. 2010-11-01 16:34:56 -04:00
Makefile [LogFS] add new flash file system 2009-11-20 20:13:39 +01:00
readwrite.c logfs: fix "Kernel BUG at readwrite.c:1193" 2010-12-22 19:43:33 -08:00
segment.c logfs: get rid of magical inodes 2010-08-09 16:48:26 -04:00
super.c switch logfs to ->mount() 2010-10-29 04:16:51 -04:00