1. 02 11月, 2011 1 次提交
  2. 26 7月, 2011 2 次提交
  3. 21 7月, 2011 1 次提交
  4. 20 7月, 2011 3 次提交
  5. 28 5月, 2011 1 次提交
  6. 26 5月, 2011 2 次提交
  7. 15 3月, 2011 1 次提交
  8. 10 3月, 2011 1 次提交
  9. 02 2月, 2011 1 次提交
    • E
      fs/vfs/security: pass last path component to LSM on inode creation · 2a7dba39
      Eric Paris 提交于
      SELinux would like to implement a new labeling behavior of newly created
      inodes.  We currently label new inodes based on the parent and the creating
      process.  This new behavior would also take into account the name of the
      new object when deciding the new label.  This is not the (supposed) full path,
      just the last component of the path.
      
      This is very useful because creating /etc/shadow is different than creating
      /etc/passwd but the kernel hooks are unable to differentiate these
      operations.  We currently require that userspace realize it is doing some
      difficult operation like that and than userspace jumps through SELinux hoops
      to get things set up correctly.  This patch does not implement new
      behavior, that is obviously contained in a seperate SELinux patch, but it
      does pass the needed name down to the correct LSM hook.  If no such name
      exists it is fine to pass NULL.
      Signed-off-by: NEric Paris <eparis@redhat.com>
      2a7dba39
  10. 13 1月, 2011 1 次提交
  11. 07 1月, 2011 5 次提交
    • N
      fs: rcu-walk aware d_revalidate method · 34286d66
      Nick Piggin 提交于
      Require filesystems be aware of .d_revalidate being called in rcu-walk
      mode (nd->flags & LOOKUP_RCU). For now do a simple push down, returning
      -ECHILD from all implementations.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      34286d66
    • N
      fs: dcache reduce branches in lookup path · fb045adb
      Nick Piggin 提交于
      Reduce some branches and memory accesses in dcache lookup by adding dentry
      flags to indicate common d_ops are set, rather than having to check them.
      This saves a pointer memory access (dentry->d_op) in common path lookup
      situations, and saves another pointer load and branch in cases where we
      have d_op but not the particular operation.
      
      Patched with:
      
      git grep -E '[.>]([[:space:]])*d_op([[:space:]])*=' | xargs sed -e 's/\([^\t ]*\)->d_op = \(.*\);/d_set_d_op(\1, \2);/' -e 's/\([^\t ]*\)\.d_op = \(.*\);/d_set_d_op(\&\1, \2);/' -i
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      fb045adb
    • N
      fs: change d_hash for rcu-walk · b1e6a015
      Nick Piggin 提交于
      Change d_hash so it may be called from lock-free RCU lookups. See similar
      patch for d_compare for details.
      
      For in-tree filesystems, this is just a mechanical change.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      b1e6a015
    • N
      fs: change d_compare for rcu-walk · 621e155a
      Nick Piggin 提交于
      Change d_compare so it may be called from lock-free RCU lookups. This
      does put significant restrictions on what may be done from the callback,
      however there don't seem to have been any problems with in-tree fses.
      If some strange use case pops up that _really_ cannot cope with the
      rcu-walk rules, we can just add new rcu-unaware callbacks, which would
      cause name lookup to drop out of rcu-walk mode.
      
      For in-tree filesystems, this is just a mechanical change.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      621e155a
    • N
      jfs: dont overwrite dentry name in d_revalidate · 2bc334dc
      Nick Piggin 提交于
      Use vfat's method for dealing with negative dentries to preserve case,
      rather than overwrite dentry name in d_revalidate, which is a bit ugly
      and also gets in the way of doing lock-free path walking.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      2bc334dc
  12. 26 10月, 2010 1 次提交
  13. 16 4月, 2010 1 次提交
  14. 05 3月, 2010 3 次提交
    • C
      dquot: cleanup dquot initialize routine · 871a2931
      Christoph Hellwig 提交于
      Get rid of the initialize dquot operation - it is now always called from
      the filesystem and if a filesystem really needs it's own (which none
      currently does) it can just call into it's own routine directly.
      
      Rename the now static low-level dquot_initialize helper to __dquot_initialize
      and vfs_dq_init to dquot_initialize to have a consistent namespace.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      871a2931
    • C
      dquot: move dquot initialization responsibility into the filesystem · 907f4554
      Christoph Hellwig 提交于
      Currently various places in the VFS call vfs_dq_init directly.  This means
      we tie the quota code into the VFS.  Get rid of that and make the
      filesystem responsible for the initialization.   For most metadata operations
      this is a straight forward move into the methods, but for truncate and
      open it's a bit more complicated.
      
      For truncate we currently only call vfs_dq_init for the sys_truncate case
      because open already takes care of it for ftruncate and open(O_TRUNC) - the
      new code causes an additional vfs_dq_init for those which is harmless.
      
      For open the initialization is moved from do_filp_open into the open method,
      which means it happens slightly earlier now, and only for regular files.
      The latter is fine because we don't need to initialize it for operations
      on special files, and we already do it as part of the namespace operations
      for directories.
      
      Add a dquot_file_open helper that filesystems that support generic quotas
      can use to fill in ->open.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      907f4554
    • C
      dquot: move dquot transfer responsibility into the filesystem · 759bfee6
      Christoph Hellwig 提交于
      Currently notify_change calls vfs_dq_transfer directly.  This means
      we tie the quota code into the VFS.  Get rid of that and make the
      filesystem responsible for the transfer.  Most filesystems already
      do this, only ufs and udf need the code added, and for jfs it needs to
      be enabled unconditionally instead of only when ACLs are enabled.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      759bfee6
  15. 09 9月, 2009 1 次提交
  16. 28 3月, 2009 1 次提交
  17. 26 3月, 2009 1 次提交
  18. 01 1月, 2009 1 次提交
  19. 23 10月, 2008 2 次提交
  20. 13 5月, 2008 1 次提交
  21. 08 2月, 2008 3 次提交
  22. 04 1月, 2008 2 次提交
  23. 22 10月, 2007 1 次提交
  24. 18 7月, 2007 1 次提交
    • C
      knfsd: exportfs: remove iget abuse · 5ca29607
      Christoph Hellwig 提交于
      When the exportfs interface was added the expectation was that filesystems
      provide an operation to convert from a file handle to an inode/dentry, but it
      kept a backwards compat option that still calls into iget.
      
      Calling into iget from non-filesystem code is very bad, because it gives too
      little information to filesystem, and simply crashes if the filesystem doesn't
      implement the ->read_inode routine.
      
      Fortunately there are only two filesystems left using this fallback: efs and
      jfs.  This patch moves a copy of export_iget to each of those to implement the
      get_dentry method.
      
      While this is a temporary increase of lines of code in the kernel it allows
      for a much cleaner interface and important code restructuring in later
      patches.
      
      [akpm@linux-foundation.org: add jfs_get_inode_flags() declaration]
      Signed-off-by: NDave Kleikamp <shaggy@linux.vnet.ibm.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5ca29607
  25. 07 6月, 2007 1 次提交
  26. 13 2月, 2007 1 次提交