1. 26 5月, 2010 1 次提交
    • C
      Btrfs: rework O_DIRECT enospc handling · 4845e44f
      Chris Mason 提交于
      This changes O_DIRECT write code to mark extents as delalloc
      while it is processing them.  Yan Zheng has reworked the
      enospc accounting based on tracking delalloc extents and
      this makes it much easier to track enospc in the O_DIRECT code.
      
      There are a few space cases with the O_DIRECT code though,
      it only sets the EXTENT_DELALLOC bits, instead of doing
      EXTENT_DELALLOC | EXTENT_DIRTY | EXTENT_UPTODATE, because
      we don't want to mess with clearing the dirty and uptodate
      bits when things go wrong.  This is important because there
      are no pages in the page cache, so any extent state structs
      that we put in the tree won't get freed by releasepage.  We have
      to clear them ourselves as the DIO ends.
      
      With this commit, we reserve space at in btrfs_file_aio_write,
      and then as each btrfs_direct_IO call progresses it sets
      EXTENT_DELALLOC on the range.
      
      btrfs_get_blocks_direct is responsible for clearing the delalloc
      at the same time it drops the extent lock.
      Signed-off-by: NChris Mason <chris.mason@oracle.com>
      4845e44f
  2. 25 5月, 2010 19 次提交
  3. 17 5月, 2010 3 次提交
  4. 16 5月, 2010 12 次提交
  5. 15 5月, 2010 5 次提交
    • J
      JFS: Free sbi memory in error path · 684bdc7f
      Jan Blunck 提交于
      I spotted the missing kfree() while removing the BKL.
      
      [akpm@linux-foundation.org: avoid multiple returns so it doesn't happen again]
      Signed-off-by: NJan Blunck <jblunck@suse.de>
      Cc: Dave Kleikamp <shaggy@austin.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      684bdc7f
    • D
      fs/sysv: dereferencing ERR_PTR() · 404e7812
      Dan Carpenter 提交于
      I moved the dir_put_page() inside the if condition so we don't dereference
      "page", if it's an ERR_PTR().
      Signed-off-by: NDan Carpenter <error27@gmail.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      404e7812
    • A
      Fix double-free in logfs · 26562449
      Al Viro 提交于
      iput() is needed *until* we'd done successful d_alloc_root()
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      26562449
    • A
      Fix the regression created by "set S_DEAD on unlink()..." commit · d83c49f3
      Al Viro 提交于
      1) i_flags simply doesn't work for mount/unlink race prevention;
      we may have many links to file and rm on one of those obviously
      shouldn't prevent bind on top of another later on.  To fix it
      right way we need to mark _dentry_ as unsuitable for mounting
      upon; new flag (DCACHE_CANT_MOUNT) is protected by d_flags and
      i_mutex on the inode in question.  Set it (with dont_mount(dentry))
      in unlink/rmdir/etc., check (with cant_mount(dentry)) in places
      in namespace.c that used to check for S_DEAD.  Setting S_DEAD
      is still needed in places where we used to set it (for directories
      getting killed), since we rely on it for readdir/rmdir race
      prevention.
      
      2) rename()/mount() protection has another bogosity - we unhash
      the target before we'd checked that it's not a mountpoint.  Fixed.
      
      3) ancient bogosity in pivot_root() - we locked i_mutex on the
      right directory, but checked S_DEAD on the different (and wrong)
      one.  Noticed and fixed.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      d83c49f3
    • L
      Merge master.kernel.org:/home/rmk/linux-2.6-arm · bfcf1ae2
      Linus Torvalds 提交于
      * master.kernel.org:/home/rmk/linux-2.6-arm:
        ARM: 6126/1: ARM mpcore_wdt: fix build failure and other fixes
        ARM: 6125/1: ARM TWD: move TWD registers to common header
        ARM: 6110/1: Fix Thumb-2 kernel builds when UACCESS_WITH_MEMCPY is enabled
        ARM: 6112/1: Use the Inner Shareable I-cache and BTB ops on ARMv7 SMP
        ARM: 6111/1: Implement read/write for ownership in the ARMv6 DMA cache ops
        ARM: 6106/1: Implement copy_to_user_page() for noMMU
        ARM: 6105/1: Fix the __arm_ioremap_caller() definition in nommu.c
      bfcf1ae2