1. 11 5月, 2015 1 次提交
  2. 16 4月, 2015 2 次提交
  3. 17 2月, 2015 4 次提交
  4. 26 1月, 2014 1 次提交
  5. 29 6月, 2013 1 次提交
  6. 23 7月, 2012 1 次提交
  7. 14 7月, 2012 2 次提交
  8. 11 5月, 2012 1 次提交
    • L
      vfs: make it possible to access the dentry hash/len as one 64-bit entry · 26fe5750
      Linus Torvalds 提交于
      This allows comparing hash and len in one operation on 64-bit
      architectures.  Right now only __d_lookup_rcu() takes advantage of this,
      since that is the case we care most about.
      
      The use of anonymous struct/unions hides the alternate 64-bit approach
      from most users, the exception being a few cases where we initialize a
      'struct qstr' with a static initializer.  This makes the problematic
      cases use a new QSTR_INIT() helper function for that (but initializing
      just the name pointer with a "{ .name = xyzzy }" initializer remains
      valid, as does just copying another qstr structure).
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      26fe5750
  9. 21 3月, 2012 1 次提交
  10. 04 1月, 2012 3 次提交
  11. 26 7月, 2011 1 次提交
  12. 20 7月, 2011 1 次提交
  13. 26 5月, 2011 3 次提交
  14. 02 3月, 2011 1 次提交
    • J
      ext2: Fix link count corruption under heavy link+rename load · e8a80c6f
      Josh Hunt 提交于
      vfs_rename_other() does not lock renamed inode with i_mutex. Thus changing
      i_nlink in a non-atomic manner (which happens in ext2_rename()) can corrupt
      it as reported and analyzed by Josh.
      
      In fact, there is no good reason to mess with i_nlink of the moved file.
      We did it presumably to simulate linking into the new directory and unlinking
      from an old one. But the practical effect of this is disputable because fsck
      can possibly treat file as being properly linked into both directories without
      writing any error which is confusing. So we just stop increment-decrement
      games with i_nlink which also fixes the corruption.
      
      CC: stable@kernel.org
      CC: Al Viro <viro@ZenIV.linux.org.uk>
      Signed-off-by: NJosh Hunt <johunt@akamai.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      e8a80c6f
  15. 01 3月, 2011 1 次提交
    • J
      ext2: Fix link count corruption under heavy link+rename load · 03885ac3
      Josh Hunt 提交于
      vfs_rename_other() does not lock renamed inode with i_mutex. Thus changing
      i_nlink in a non-atomic manner (which happens in ext2_rename()) can corrupt
      it as reported and analyzed by Josh.
      
      In fact, there is no good reason to mess with i_nlink of the moved file.
      We did it presumably to simulate linking into the new directory and unlinking
      from an old one. But the practical effect of this is disputable because fsck
      can possibly treat file as being properly linked into both directories without
      writing any error which is confusing. So we just stop increment-decrement
      games with i_nlink which also fixes the corruption.
      
      CC: stable@kernel.org
      CC: Al Viro <viro@ZenIV.linux.org.uk>
      Signed-off-by: NJosh Hunt <johunt@akamai.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      03885ac3
  16. 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
  17. 11 1月, 2011 1 次提交
  18. 26 10月, 2010 1 次提交
  19. 05 3月, 2010 2 次提交
    • 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
  20. 23 9月, 2009 1 次提交
  21. 09 9月, 2009 1 次提交
  22. 06 9月, 2009 1 次提交
  23. 01 7月, 2009 1 次提交
    • B
      ext2: return -EIO not -ESTALE on directory traversal through deleted inode · 4d6c13f8
      Bryan Donlan 提交于
      ext2_iget() returns -ESTALE if invoked on a deleted inode, in order to
      report errors to NFS properly.  However, in ext[234]_lookup(), this
      -ESTALE can be propagated to userspace if the filesystem is corrupted such
      that a directory entry references a deleted inode.  This leads to a
      misleading error message - "Stale NFS file handle" - and confusion on the
      part of the admin.
      
      The bug can be easily reproduced by creating a new filesystem, making a
      link to an unused inode using debugfs, then mounting and attempting to ls
      -l said link.
      
      This patch thus changes ext2_lookup to return -EIO if it receives -ESTALE
      from ext2_iget(), as ext2 does for other filesystem metadata corruption;
      and also invokes the appropriate ext*_error functions when this case is
      detected.
      Signed-off-by: NBryan Donlan <bdonlan@gmail.com>
      Cc: <linux-ext4@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4d6c13f8
  24. 19 6月, 2009 1 次提交
    • J
      ext2: Do not update mtime of a moved directory · 39fe7557
      Jan Kara 提交于
      One of our users is complaining that his backup tool is upset on ext2
      (while it's happy on ext3, xfs, ...) because of the mtime change.
      
      The problem is:
      
          mkdir foo
          mkdir bar
          mkdir foo/a
      
      Now under ext2:
          mv foo/a foo/b
      
      changes mtime of 'foo/a' (foo/b after the move).  That does not really
      make sense and it does not happen under any other filesystem I've seen.
      
      More complicated is:
          mv foo/a bar/a
      
      This changes mtime of foo/a (bar/a after the move) and it makes some
      sense since we had to update parent directory pointer of foo/a.  But
      again, no other filesystem does this.  So after some thoughts I'd vote
      for consistency and change ext2 to behave the same as other filesystems.
      
      Do not update mtime of a moved directory.  Specs don't say anything
      about it (neither that it should, nor that it should not be updated) and
      other common filesystems (ext3, ext4, xfs, reiserfs, fat, ...) don't do
      it.  So let's become more consistent.
      
      Spotted by ronny.pretzsch@dfs.de, initial fix by Jörn Engel.
      
      Reported-by: <ronny.pretzsch@dfs.de>
      Cc: <hare@suse.de>
      Cc: Jörn Engel <joern@logfs.org>
      Signed-off-by: NJan Kara <jack@suse.cz>
      Cc: <linux-ext4@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      39fe7557
  25. 01 1月, 2009 1 次提交
    • A
      nfsd race fixes: ext2 · 41080b5a
      Al Viro 提交于
      * make ext2_new_inode() put the inode into icache in locked state
      * do not unlock until the inode is fully set up; otherwise nfsd
      might pick it in half-baked state.
      * make sure that ext2_new_inode() does *not* lead to two inodes with the
      same inumber hashed at the same time; otherwise a bogus fhandle coming
      from nfsd might race with inode creation:
      
      nfsd: iget_locked() creates inode
      nfsd: try to read from disk, block on that.
      ext2_new_inode(): allocate inode with that inumber
      ext2_new_inode(): insert it into icache, set it up and dirty
      ext2_write_inode(): get the relevant part of inode table in cache,
      set the entry for our inode (and start writing to disk)
      nfsd: get CPU again, look into inode table, see nice and sane on-disk
      inode, set the in-core inode from it
      
      oops - we have two in-core inodes with the same inumber live in icache,
      both used for IO.  Welcome to fs corruption...
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      41080b5a
  26. 23 10月, 2008 2 次提交
  27. 08 2月, 2008 1 次提交
  28. 13 2月, 2007 1 次提交
  29. 01 10月, 2006 1 次提交