• Prasad Joshi's avatar
    logfs: fix "Kernel BUG at readwrite.c:1193" · f06328d7
    Prasad Joshi authored
    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=20162Signed-off-by: default avatarPrasad 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: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    f06328d7
readwrite.c 55.6 KB