1. 29 4月, 2012 1 次提交
    • L
      VFS: clean up and simplify getname_flags() · 3f9f0aa6
      Linus Torvalds 提交于
      This removes a number of silly games around strncpy_from_user() in
      do_getname(), and removes that helper function entirely.  We instead
      make getname_flags() just use strncpy_from_user() properly directly.
      
      Removing the wrapper function simplifies things noticeably, mostly
      because we no longer play the unnecessary games with segments (x86
      strncpy_from_user() no longer needs the hack), but also because the
      empty path handling is just much more obvious.  The return value of
      "strncpy_to_user()" is much more obvious than checking an odd error
      return case from do_getname().
      
      [ non-x86 architectures were notified of this change several weeks ago,
        since it is possible that they have copied the old broken x86
        strncpy_from_user. But nobody reacted, so .. See
      
          http://www.spinics.net/lists/linux-arch/msg17313.html
      
        for details ]
      
      Cc: linux-arch@vger.kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3f9f0aa6
  2. 07 4月, 2012 1 次提交
    • L
      Make the "word-at-a-time" helper functions more commonly usable · f68e556e
      Linus Torvalds 提交于
      I have a new optimized x86 "strncpy_from_user()" that will use these
      same helper functions for all the same reasons the name lookup code uses
      them.  This is preparation for that.
      
      This moves them into an architecture-specific header file.  It's
      architecture-specific for two reasons:
      
       - some of the functions are likely to want architecture-specific
         implementations.  Even if the current code happens to be "generic" in
         the sense that it should work on any little-endian machine, it's
         likely that the "multiply by a big constant and shift" implementation
         is less than optimal for an architecture that has a guaranteed fast
         bit count instruction, for example.
      
       - I expect that if architectures like sparc want to start playing
         around with this, we'll need to abstract out a few more details (in
         particular the actual unaligned accesses).  So we're likely to have
         more architecture-specific stuff if non-x86 architectures start using
         this.
      
         (and if it turns out that non-x86 architectures don't start using
         this, then having it in an architecture-specific header is still the
         right thing to do, of course)
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f68e556e
  3. 01 4月, 2012 14 次提交
  4. 23 3月, 2012 3 次提交
  5. 22 3月, 2012 1 次提交
  6. 21 3月, 2012 2 次提交
  7. 20 3月, 2012 1 次提交
  8. 11 3月, 2012 2 次提交
  9. 09 3月, 2012 1 次提交
  10. 03 3月, 2012 3 次提交
    • L
      vfs: export full_name_hash() function to modules · ae942ae7
      Linus Torvalds 提交于
      Commit 5707c87f "vfs: uninline full_name_hash()" broke the modular
      build, because it needs exporting now that it isn't inlined any more.
      Reported-by: NTetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ae942ae7
    • L
      vfs: split up name hashing in link_path_walk() into helper function · 200e9ef7
      Linus Torvalds 提交于
      The code in link_path_walk() that finds out the length and the hash of
      the next path component is some of the hottest code in the kernel.  And
      I have a version of it that does things at the full width of the CPU
      wordsize at a time, but that means that we *really* want to split it up
      into a separate helper function.
      
      So this re-organizes the code a bit and splits the hashing part into a
      helper function called "hash_name()".  It returns the length of the
      pathname component, while at the same time computing and writing the
      hash to the appropriate location.
      
      The code generation is slightly changed by this patch, but generally for
      the better - and the added abstraction actually makes the code easier to
      read too.  And the new interface is well suited for replacing just the
      "hash_name()" function with alternative implementations.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      200e9ef7
    • L
      vfs: uninline full_name_hash() · 0145acc2
      Linus Torvalds 提交于
      .. and also use it in lookup_one_len() rather than open-coding it.
      
      There aren't any performance-critical users, so inlining it is silly.
      But it wouldn't matter if it wasn't for the fact that the word-at-a-time
      dentry name patches want to conditionally replace the function, and
      uninlining it sets the stage for that.
      
      So again, this is a preparatory patch that doesn't change any semantics,
      and only prepares for a much cleaner and testable word-at-a-time dentry
      name accessor patch.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0145acc2
  11. 29 2月, 2012 1 次提交
  12. 14 2月, 2012 1 次提交
  13. 18 1月, 2012 1 次提交
  14. 04 1月, 2012 8 次提交