1. 31 7月, 2012 1 次提交
    • A
      ext2: use memweight() · ecd0afa3
      Akinobu Mita 提交于
      Convert ext2_count_free() to use memweight() instead of table lookup
      based counting clear bits implementation.  This change only affects the
      code segments enabled by EXT2FS_DEBUG.
      
      Note that this memweight() call can't be replaced with a single
      bitmap_weight() call, although the pointer to the memory area is aligned
      to long-word boundary.  Because the size of the memory area may not be a
      multiple of BITS_PER_LONG, then it returns wrong value on big-endian
      architecture.
      
      This also includes the following changes.
      
      - Remove unnecessary map == NULL check in ext2_count_free() which
        always takes non-null pointer as the memory area.
      
      - Fix printk format warning that only reveals with EXT2FS_DEBUG.
      Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
      Acked-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ecd0afa3
  2. 11 4月, 2012 1 次提交
    • J
      ext2: Remove s_dirt handling · b838ec22
      Jan Kara 提交于
      Places which modify superblock feature / state fields mark the superblock
      buffer dirty so it is written out by flusher thread. Thus there's no need to
      set s_dirt there.
      
      The only other fields changing in the superblock are the numbers of free
      blocks, free inodes and s_wtime. There's no real need to write (or even
      compute) these periodically. Free blocks / inodes counters are recomputed on
      every mount from group counters anyway and value of s_wtime is only
      informational and imprecise anyway. So it should be enough to write these
      opportunistically on mount, remount, umount, and sync_fs times.
      Signed-off-by: NJan Kara <jack@suse.cz>
      b838ec22
  3. 09 1月, 2012 1 次提交
    • J
      ext2: Fix error handling on inode bitmap corruption · ef6919c2
      Jan Kara 提交于
      When insert_inode_locked() fails in ext2_new_inode() it most likely means inode
      bitmap got corrupted and we allocated again inode which is already in use. Also
      doing unlock_new_inode() during error recovery is wrong since the inode does
      not have I_NEW set. Fix the problem by informing about filesystem error and
      jumping to fail: (instead of fail_drop:) which doesn't call unlock_new_inode().
      Reviewed-by: NEric Sandeen <sandeen@redhat.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      ef6919c2
  4. 04 1月, 2012 1 次提交
  5. 02 11月, 2011 1 次提交
  6. 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
  7. 10 8月, 2010 1 次提交
  8. 22 5月, 2010 2 次提交
  9. 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: cleanup dquot drop routine · 9f754758
      Christoph Hellwig 提交于
      Get rid of the drop 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_drop helper to __dquot_drop
      and vfs_dq_drop to dquot_drop to have a consistent namespace.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      9f754758
    • C
      dquot: cleanup inode allocation / freeing routines · 63936dda
      Christoph Hellwig 提交于
      Get rid of the alloc_inode and free_inode dquot operations - they are
      always called from the filesystem and if a filesystem really needs
      their own (which none currently does) it can just call into it's
      own routine directly.
      
      Also get rid of the vfs_dq_alloc/vfs_dq_free wrappers and always
      call the lowlevel dquot_alloc_inode / dqout_free_inode routines
      directly, which now lose the number argument which is always 1.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      63936dda
  10. 26 3月, 2009 1 次提交
  11. 09 1月, 2009 2 次提交
  12. 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
  13. 14 11月, 2008 1 次提交
  14. 28 4月, 2008 1 次提交
  15. 22 4月, 2008 1 次提交
  16. 17 10月, 2007 3 次提交
  17. 27 9月, 2006 1 次提交
  18. 19 9月, 2006 1 次提交
  19. 01 7月, 2006 1 次提交
  20. 26 6月, 2006 1 次提交
  21. 04 2月, 2006 1 次提交
  22. 09 11月, 2005 1 次提交
  23. 28 9月, 2005 1 次提交
  24. 10 9月, 2005 1 次提交
  25. 28 7月, 2005 1 次提交
  26. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4