• Christoph Hellwig's avatar
    [PATCH] udf deadlock fix · 1ccfa52f
    Christoph Hellwig authored
    Yes, me too.  generic_shutdown_super() takes lock_super().  And udf uses
    lock_super for protecting its block allocation data strutures.  Trivial
    deadlock on unmount.
    
    Below is a fix to switch udf to it's own private locking.  It's safe
    because it doesn't intefere with VFS lock_super usage anywhere.
    
    udf_free_inode has some more updates than simply switching the used
    lock:
    
     - clear_inode() call moved outside locked section to avoid another
       deadlock
     - unused variable ino killed
     - is_directory moved into the conditional it's actually used in
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    
    (note that I see memory corruption in UDF_I_DATA(inode), but I've
    reproduced that with a kernel without all recent udf changes.  I'll
    debug that one further)
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    1ccfa52f
balloc.c 24.3 KB