1. 24 8月, 2009 1 次提交
  2. 08 8月, 2009 2 次提交
    • C
      vfs: add __destroy_inode · 2e00c97e
      Christoph Hellwig 提交于
      When we want to tear down an inode that lost the add to the cache race
      in XFS we must not call into ->destroy_inode because that would delete
      the inode that won the race from the inode cache radix tree.
      
      This patch provides the __destroy_inode helper needed to fix this,
      the actual fix will be in th next patch.  As XFS was the only reason
      destroy_inode was exported we shift the export to the new __destroy_inode.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NEric Sandeen <sandeen@sandeen.net>
      2e00c97e
    • C
      vfs: fix inode_init_always calling convention · 54e34621
      Christoph Hellwig 提交于
      Currently inode_init_always calls into ->destroy_inode if the additional
      initialization fails.  That's not only counter-intuitive because
      inode_init_always did not allocate the inode structure, but in case of
      XFS it's actively harmful as ->destroy_inode might delete the inode from
      a radix-tree that has never been added.  This in turn might end up
      deleting the inode for the same inum that has been instanciated by
      another process and cause lots of cause subtile problems.
      
      Also in the case of re-initializing a reclaimable inode in XFS it would
      free an inode we still want to keep alive.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NEric Sandeen <sandeen@sandeen.net>
      54e34621
  3. 30 7月, 2009 1 次提交
  4. 24 6月, 2009 2 次提交
  5. 17 6月, 2009 2 次提交
  6. 15 6月, 2009 1 次提交
  7. 12 6月, 2009 12 次提交
  8. 11 5月, 2009 1 次提交
  9. 09 5月, 2009 3 次提交
    • A
      Fix races around the access to ->s_options · 2a32cebd
      Al Viro 提交于
      Put generic_show_options read access to s_options under rcu_read_lock,
      split save_mount_options() into "we are setting it the first time"
      (uses in foo_fill_super()) and "we are relacing and freeing the old one",
      synchronize_rcu() before kfree() in the latter.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      2a32cebd
    • A
      Switch open_exec() and sys_uselib() to do_open_filp() · 6e8341a1
      Al Viro 提交于
      ... and make path_lookup_open() static
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      6e8341a1
    • A
      New helper: deactivate_locked_super() · 74dbbdd7
      Al Viro 提交于
      Does equivalent of up_write(&s->s_umount); deactivate_super(s);
      However, it does not does not unlock it until it's all over.
      As the result, it's safe to use to dispose of new superblock on ->get_sb()
      failure exits - nobody will see the sucker until it's all over.
      Equivalent using up_write/deactivate_super is safe for that purpose
      if superblock is either	safe to use or has NULL ->s_root when we unlock.
      Normally filesystems take the required precautions, but
      	a) we do have bugs in that area in some of them.
      	b) up_write/deactivate_super sequence is extremely common,
      so the helper makes sense anyway.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      74dbbdd7
  10. 25 4月, 2009 1 次提交
    • F
      lockd: call locks_release_private to cleanup per-filesystem state · a9e61e25
      Felix Blyakher 提交于
      For every lock request lockd creates a new file_lock object
      in nlmsvc_setgrantargs() by copying the passed in file_lock with
      locks_copy_lock(). A filesystem can attach it's own lock_operations
      vector to the file_lock. It has to be cleaned up at the end of the
      file_lock's life. However, lockd doesn't do it today, yet it
      asserts in nlmclnt_release_lockargs() that the per-filesystem
      state is clean.
      This patch fixes it by exporting locks_release_private() and adding
      it to nlmsvc_freegrantargs(), to be symmetrical to creating a
      file_lock in nlmsvc_setgrantargs().
      Signed-off-by: NFelix Blyakher <felixb@sgi.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      a9e61e25
  11. 21 4月, 2009 3 次提交
  12. 15 4月, 2009 3 次提交
  13. 07 4月, 2009 1 次提交
  14. 06 4月, 2009 2 次提交
  15. 03 4月, 2009 2 次提交
    • I
      kmemtrace, fs: uninline simple_transaction_set() · 76791ab2
      Ingo Molnar 提交于
      Impact: cleanup
      
      We want to remove percpu.h from rcupdate.h (for upcoming kmemtrace
      changes), but this is not possible currently without breaking the
      build because fs.h has an implicit include file depedency: it
      uses PAGE_SIZE but does not include asm/page.h which defines it.
      
      This problem gets masked in practice because most fs.h using sites
      use rcupreempt.h (and other headers) which includes percpu.h which
      brings in asm/page.h indirectly.
      
      We cannot add asm/page.h to asm/fs.h because page.h is not an
      exported header.
      
      Move simple_transaction_set() to the other simple-transaction
      file helpers in fs/libfs.c.
      
      This removes the include file hell and also reduces
      kernel size a bit.
      Acked-by: NAl Viro <viro@zeniv.linux.org.uk>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: Pekka Enberg <penberg@cs.helsinki.fi>
      Cc: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
      Cc: paulmck@linux.vnet.ibm.com
      LKML-Reference: <1237898630.25315.83.camel@penberg-laptop>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      76791ab2
    • P
      kmemtrace, fs, security: move alloc_secdata() and free_secdata() to linux/security.h · 3d544f41
      Pekka Enberg 提交于
      Impact: cleanup
      
      We want to remove percpu.h from rcupdate.h (for upcoming kmemtrace
      changes), but this is not possible currently without breaking the
      build because fs.h has implicit include file depedencies: it uses
      GFP_* types in inlines but does not include gfp.h.
      
      In practice most fs.h using .c files get gfp.h included implicitly,
      via an indirect route: via rcupdate.h inclusion - so this underlying
      problem gets masked in practice.
      
      So we want to solve fs.h's dependency on gfp.h.
      
      gfp.h can not be included here directly because it is not exported and it
      would break the build the following way:
      
        /home/mingo/tip/usr/include/linux/bsg.h:11: found __[us]{8,16,32,64} type without #include <linux/types.h>
        /home/mingo/tip/usr/include/linux/fs.h:11: included file 'linux/gfp.h' is not exported
        make[3]: *** [/home/mingo/tip/usr/include/linux/.check] Error 1
        make[2]: *** [linux] Error 2
      
      As suggested by Alexey Dobriyan, move alloc_secdata() and free_secdata()
      to linux/security.h - they belong there. This also cleans fs.h of GFP_*
      usage.
      Suggested-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NPekka Enberg <penberg@cs.helsinki.fi>
      Cc: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
      LKML-Reference: <1237906803.25315.96.camel@penberg-laptop>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      3d544f41
  16. 01 4月, 2009 3 次提交