1. 19 8月, 2008 1 次提交
    • J
      udf: Fix lock inversion between iprune_mutex and alloc_mutex (v2) · db0badc5
      Jan Kara 提交于
      A memory allocation inside alloc_mutex must not recurse back into the
      filesystem itself because that leads to lock inversion between iprune_mutex and
      alloc_mutex (and thus to deadlocks - see traces below). alloc_mutex is actually
      needed only to update allocation statistics in the superblock so we can drop it
      before we start allocating memory for the inode.
      
      tar           D ffff81015b9c8c90     0  6614   6612
       ffff8100d5a21a20 0000000000000086 0000000000000000 00000000ffff0000
       ffff81015b9c8c90 ffff81015b8f0cd0 ffff81015b9c8ee0 0000000000000000
       0000000000000003 0000000000000000 0000000000000000 0000000000000000
      Call Trace:
       [<ffffffff803c1d8a>] __mutex_lock_slowpath+0x64/0x9b
       [<ffffffff803c1bef>] mutex_lock+0xa/0xb
       [<ffffffff8027f8c2>] shrink_icache_memory+0x38/0x200
       [<ffffffff80257742>] shrink_slab+0xe3/0x15b
       [<ffffffff802579db>] try_to_free_pages+0x221/0x30d
       [<ffffffff8025657e>] isolate_pages_global+0x0/0x31
       [<ffffffff8025324b>] __alloc_pages_internal+0x252/0x3ab
       [<ffffffff8026b08b>] cache_alloc_refill+0x22e/0x47b
       [<ffffffff8026ae37>] kmem_cache_alloc+0x3b/0x61
       [<ffffffff8026b15b>] cache_alloc_refill+0x2fe/0x47b
       [<ffffffff8026b34e>] __kmalloc+0x76/0x9c
       [<ffffffffa00751f2>] :udf:udf_new_inode+0x202/0x2e2
       [<ffffffffa007ae5e>] :udf:udf_create+0x2f/0x16d
       [<ffffffffa0078f27>] :udf:udf_lookup+0xa6/0xad
      ...
      kswapd0       D ffff81015b9d9270     0   125      2
       ffff81015b903c28 0000000000000046 ffffffff8028cbb0 00000000fffffffb
       ffff81015b9d9270 ffff81015b8f0cd0 ffff81015b9d94c0 000000000271b490
       ffffe2000271b458 ffffe2000271b420 ffffe20002728dc8 ffffe20002728d90
      Call Trace:
       [<ffffffff8028cbb0>] __set_page_dirty+0xeb/0xf5
       [<ffffffff8025403a>] get_dirty_limits+0x1d/0x22f
       [<ffffffff803c1d8a>] __mutex_lock_slowpath+0x64/0x9b
       [<ffffffff803c1bef>] mutex_lock+0xa/0xb
       [<ffffffffa0073f58>] :udf:udf_bitmap_free_blocks+0x47/0x1eb
       [<ffffffffa007df31>] :udf:udf_discard_prealloc+0xc6/0x172
       [<ffffffffa007875a>] :udf:udf_clear_inode+0x1e/0x48
       [<ffffffff8027f121>] clear_inode+0x6d/0xc4
       [<ffffffff8027f7f2>] dispose_list+0x56/0xee
       [<ffffffff8027fa5a>] shrink_icache_memory+0x1d0/0x200
       [<ffffffff80257742>] shrink_slab+0xe3/0x15b
       [<ffffffff80257e93>] kswapd+0x346/0x447
      ...
      Reported-by: NTibor Tajti <tibor.tajti@gmail.com>
      Reviewed-by: NIngo Oeser <ioe-lkml@rameria.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      db0badc5
  2. 17 4月, 2008 2 次提交
    • M
      udf: replace all adds to little endians variables with le*_add_cpu · c2104fda
      marcin.slusarz@gmail.com 提交于
      replace all:
      	little_endian_variable = cpu_to_leX(leX_to_cpu(little_endian_variable) +
      	                                    expression_in_cpu_byteorder);
      with:
      	leX_add_cpu(&little_endian_variable, expression_in_cpu_byteorder);
      sparse didn't generate any new warning with this patch
      
      Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com
      Signed-off-by: NJan Kara <jack@suse.cz>
      c2104fda
    • C
      udf: move headers out include/linux/ · 15aebd28
      Christoph Hellwig 提交于
      There's really no reason to keep udf headers in include/linux as they're
      not used by anything but fs/udf/.
      
      This patch merges most of include/linux/udf_fs_i.h into fs/udf/udf_i.h,
      include/linux/udf_fs_sb.h into fs/udf/udf_sb.h and
      include/linux/udf_fs.h into fs/udf/udfdecl.h.
      
      The only thing remaining in include/linux/ is a stub of udf_fs_i.h
      defining the four user-visible udf ioctls.  It's also moved from
      unifdef-y to headers-y because it can be included unconditionally now.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      15aebd28
  3. 09 2月, 2008 4 次提交
  4. 22 7月, 2007 1 次提交
  5. 20 7月, 2007 1 次提交
  6. 17 7月, 2007 1 次提交
  7. 27 9月, 2006 2 次提交
  8. 06 8月, 2006 1 次提交
    • E
      [PATCH] udf: initialize parts of inode earlier in create · 225add61
      Eric Sandeen 提交于
      I saw an oops down this path when trying to create a new file on a UDF
      filesystem which was internally marked as readonly, but mounted rw:
      
      udf_create
              udf_new_inode
                      new_inode
                              alloc_inode
                              	udf_alloc_inode
                      udf_new_block
                              returns EIO due to readonlyness
                      iput (on error)
                              udf_put_inode
                                      udf_discard_prealloc
                                              udf_next_aext
                                                      udf_current_aext
                                                              udf_get_fileshortad
                                                                      OOPS
      
      the udf_discard_prealloc() path was examining uninitialized fields of the
      udf inode.
      
      udf_discard_prealloc() already has this code to short-circuit the discard
      path if no extents are preallocated:
      
              if (UDF_I_ALLOCTYPE(inode) == ICBTAG_FLAG_AD_IN_ICB ||
                      inode->i_size == UDF_I_LENEXTENTS(inode))
              {
                      return;
              }
      
      so if we initialize UDF_I_LENEXTENTS(inode) = 0 earlier in udf_new_inode,
      we won't try to free the (not) preallocated blocks, since this will match
      the i_size = 0 set when the inode was initialized.
      Signed-off-by: NEric Sandeen <sandeen@sandeen.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      225add61
  9. 23 3月, 2006 1 次提交
  10. 03 1月, 2006 1 次提交
  11. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4