1. 26 3月, 2011 26 次提交
  2. 25 3月, 2011 14 次提交
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 · d39dd11c
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
        fs: simplify iget & friends
        fs: pull inode->i_lock up out of writeback_single_inode
        fs: rename inode_lock to inode_hash_lock
        fs: move i_wb_list out from under inode_lock
        fs: move i_sb_list out from under inode_lock
        fs: remove inode_lock from iput_final and prune_icache
        fs: Lock the inode LRU list separately
        fs: factor inode disposal
        fs: protect inode->i_state with inode->i_lock
        autofs4: Do not potentially dereference NULL pointer returned by fget() in autofs_dev_ioctl_setpipefd()
        autofs4 - remove autofs4_lock
        autofs4 - fix d_manage() return on rcu-walk
        autofs4 - fix autofs4_expire_indirect() traversal
        autofs4 - fix dentry leak in autofs4_expire_direct()
        autofs4 - reinstate last used update on access
        vfs - check non-mountpoint dentry might block in __follow_mount_rcu()
      d39dd11c
    • S
      [media] rc: update for bitop name changes · 30f5b28e
      Stephen Rothwell 提交于
      Fix the following compile failure:
      
        drivers/media/rc/ite-cir.c: In function 'ite_decode_bytes':
        drivers/media/rc/ite-cir.c:190: error: implicit declaration of function 'generic_find_next_le_bit'
        drivers/media/rc/ite-cir.c:199: error: implicit declaration of function 'generic_find_next_zero_le_bit'
      
      Caused by commit 620a32bb ("[media] rc: New rc-based ite-cir driver
      for several ITE CIRs") interacting with commit c4945b9e
      ("asm-generic: rename generic little-endian bitops functions").
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      30f5b28e
    • C
      fs: simplify iget & friends · 0b2d0724
      Christoph Hellwig 提交于
      Merge get_new_inode/get_new_inode_fast into iget5_locked/iget_locked
      as those were the only callers.  Remove the internal ifind/ifind_fast
      helpers - ifind_fast only had a single caller, and ifind had two
      callers wanting it to do different things.  Also clean up the comments
      in this area to focus on information important to a developer trying
      to use it, instead of overloading them with implementation details.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      0b2d0724
    • D
      fs: pull inode->i_lock up out of writeback_single_inode · 0f1b1fd8
      Dave Chinner 提交于
      First thing we do in writeback_single_inode() is take the i_lock and
      the last thing we do is drop it. A caller already holds the i_lock,
      so pull the i_lock out of writeback_single_inode() to reduce the
      round trips on this lock during inode writeback.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      0f1b1fd8
    • D
      fs: rename inode_lock to inode_hash_lock · 67a23c49
      Dave Chinner 提交于
      All that remains of the inode_lock is protecting the inode hash list
      manipulation and traversals. Rename the inode_lock to
      inode_hash_lock to reflect it's actual function.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      67a23c49
    • D
      fs: move i_wb_list out from under inode_lock · a66979ab
      Dave Chinner 提交于
      Protect the inode writeback list with a new global lock
      inode_wb_list_lock and use it to protect the list manipulations and
      traversals. This lock replaces the inode_lock as the inodes on the
      list can be validity checked while holding the inode->i_lock and
      hence the inode_lock is no longer needed to protect the list.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      a66979ab
    • D
      fs: move i_sb_list out from under inode_lock · 55fa6091
      Dave Chinner 提交于
      Protect the per-sb inode list with a new global lock
      inode_sb_list_lock and use it to protect the list manipulations and
      traversals. This lock replaces the inode_lock as the inodes on the
      list can be validity checked while holding the inode->i_lock and
      hence the inode_lock is no longer needed to protect the list.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      55fa6091
    • D
      fs: remove inode_lock from iput_final and prune_icache · f283c86a
      Dave Chinner 提交于
      Now that inode state changes are protected by the inode->i_lock and
      the inode LRU manipulations by the inode_lru_lock, we can remove the
      inode_lock from prune_icache and the initial part of iput_final().
      
      instead of using the inode_lock to protect the inode during
      iput_final, use the inode->i_lock instead. This protects the inode
      against new references being taken while we change the inode state
      to I_FREEING, as well as preventing prune_icache from grabbing the
      inode while we are manipulating it. Hence we no longer need the
      inode_lock in iput_final prior to setting I_FREEING on the inode.
      
      For prune_icache, we no longer need the inode_lock to protect the
      LRU list, and the inodes themselves are protected against freeing
      races by the inode->i_lock. Hence we can lift the inode_lock from
      prune_icache as well.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      f283c86a
    • D
      fs: Lock the inode LRU list separately · 02afc410
      Dave Chinner 提交于
      Introduce the inode_lru_lock to protect the inode_lru list. This
      lock is nested inside the inode->i_lock to allow the inode to be
      added to the LRU list in iput_final without needing to deal with
      lock inversions. This keeps iput_final() clean and neat.
      
      Further, where marking the inode I_FREEING and removing it from the
      LRU, move the LRU list manipulation within the inode->i_lock to keep
      the list manipulation consistent with iput_final. This also means
      that most of the open coded LRU list removal + unused inode
      accounting can now use the inode_lru_list_del() wrappers which
      cleans the code up further.
      
      However, this locking change means what the LRU traversal in
      prune_icache() inverts this lock ordering and needs to use trylock
      semantics on the inode->i_lock to avoid deadlocking. In these cases,
      if we fail to lock the inode we move it to the back of the LRU to
      prevent spinning on it.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      02afc410
    • D
      fs: factor inode disposal · b2b2af8e
      Dave Chinner 提交于
      We have a couple of places that dispose of inodes. factor the
      disposal into evict() to isolate this code and make it simpler to
      peel away the inode_lock from the code.
      
      While doing this, change the logic flow in iput_final() to separate
      the different cases that need to be handled to make the transitions
      the inode goes through more obvious.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      b2b2af8e
    • D
      fs: protect inode->i_state with inode->i_lock · 250df6ed
      Dave Chinner 提交于
      Protect inode state transitions and validity checks with the
      inode->i_lock. This enables us to make inode state transitions
      independently of the inode_lock and is the first step to peeling
      away the inode_lock from the code.
      
      This requires that __iget() is done atomically with i_state checks
      during list traversals so that we don't race with another thread
      marking the inode I_FREEING between the state check and grabbing the
      reference.
      
      Also remove the unlock_new_inode() memory barrier optimisation
      required to avoid taking the inode_lock when clearing I_NEW.
      Simplify the code by simply taking the inode->i_lock around the
      state change and wakeup. Because the wakeup is no longer tricky,
      remove the wake_up_inode() function and open code the wakeup where
      necessary.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      250df6ed
    • L
      Merge branch 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6 · a7351402
      Linus Torvalds 提交于
      * 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6:
        SLUB: Write to per cpu data when allocating it
        slub: Fix debugobjects with lockless fastpath
      a7351402
    • D
      lib, arch: add filter argument to show_mem and fix private implementations · b2b755b5
      David Rientjes 提交于
      Commit ddd588b5 ("oom: suppress nodes that are not allowed from
      meminfo on oom kill") moved lib/show_mem.o out of lib/lib.a, which
      resulted in build warnings on all architectures that implement their own
      versions of show_mem():
      
      	lib/lib.a(show_mem.o): In function `show_mem':
      	show_mem.c:(.text+0x1f4): multiple definition of `show_mem'
      	arch/sparc/mm/built-in.o:(.text+0xd70): first defined here
      
      The fix is to remove __show_mem() and add its argument to show_mem() in
      all implementations to prevent this breakage.
      
      Architectures that implement their own show_mem() actually don't do
      anything with the argument yet, but they could be made to filter nodes
      that aren't allowed in the current context in the future just like the
      generic implementation.
      Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Reported-by: NJames Bottomley <James.Bottomley@hansenpartnership.com>
      Suggested-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NDavid Rientjes <rientjes@google.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b2b755b5
    • L
      Merge branch 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 · e285c174
      Linus Torvalds 提交于
      * 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
        drm/vblank: update recently added vbl interface to be more future proof.
        drm radeon: Return -EINVAL on wrong pm sysfs access
        drm/radeon/kms: fix hardcoded EDID handling
        Revert "drm/i915: Don't save/restore hardware status page address register"
        drm/i915: Avoid unmapping pages from a NULL address space
        drm/i915: Fix use after free within tracepoint
        drm/i915: Restore missing command flush before interrupt on BLT ring
        drm/i915: Disable pagefaults along execbuffer relocation fast path
        drm/i915: Fix computation of pitch for dumb bo creator
        drm/i915: report correct render clock frequencies on SNB
        drm/i915/dp: Correct the order of deletion for ghost eDP devices
        drm/i915: Fix tiling corruption from pipelined fencing
        drm/i915: Re-enable self-refresh
        drm/i915: Prevent racy removal of request from client list
        drm/i915: skip redundant operations whilst enabling pipes and planes
        drm/i915: Remove surplus POSTING_READs before wait_for_vblank
        drm/radeon/kms: prefer legacy pll algo for tv-out
        drm: check for modesetting on modeset ioctls
        drm/kernel: vblank wait on crtc > 1
        drm: Fix use-after-free in drm_gem_vm_close()
      e285c174