1. 03 1月, 2009 30 次提交
  2. 01 1月, 2009 10 次提交
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 · b58602a4
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (34 commits)
        nfsd race fixes: jfs
        nfsd race fixes: reiserfs
        nfsd race fixes: ext4
        nfsd race fixes: ext3
        nfsd race fixes: ext2
        nfsd/create race fixes, infrastructure
        filesystem notification: create fs/notify to contain all fs notification
        fs/block_dev.c: __read_mostly improvement and sb_is_blkdev_sb utilization
        kill ->dir_notify()
        filp_cachep can be static in fs/file_table.c
        fix f_count description in Documentation/filesystems/files.txt
        make INIT_FS use the __RW_LOCK_UNLOCKED initialization
        take init_fs to saner place
        kill vfs_permission
        pass a struct path * to may_open
        kill walk_init_root
        remove incorrect comment in inode_permission
        expand some comments (d_path / seq_path)
        correct wrong function name of d_put in kernel document and source comment
        fix switch_names() breakage in short-to-short case
        ...
      b58602a4
    • D
      nfsd race fixes: jfs · 1f3403fa
      Dave Kleikamp 提交于
      jfs version of Al Viro's nfsd race patches
      Signed-off-by: NDave Kleikamp <shaggy@linux.vnet.ibm.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      1f3403fa
    • A
      nfsd race fixes: reiserfs · c1eaa26b
      Al Viro 提交于
      ... and the same for reiserfs.  The difference here is that we need
      insert_inode_locked4() to match iget5_locked().
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      c1eaa26b
    • A
      nfsd race fixes: ext4 · 6b38e842
      Al Viro 提交于
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      6b38e842
    • A
      nfsd race fixes: ext3 · c38012da
      Al Viro 提交于
      ext3 analog of the previous patch
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      c38012da
    • 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
    • A
      nfsd/create race fixes, infrastructure · 261bca86
      Al Viro 提交于
      new helpers - insert_inode_locked() and insert_inode_locked4().
      Hash new inode, making sure that there's no such inode in icache
      already.  If there is and it does not end up unhashed (as would
      happen if we have nfsd trying to resolve a bogus fhandle), fail.
      Otherwise insert our inode into hash and succeed.
      
      In either case have i_state set to new+locked; cleanup ends up
      being simpler with such calling conventions.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      261bca86
    • E
      filesystem notification: create fs/notify to contain all fs notification · 272eb014
      Eric Paris 提交于
      Creating a generic filesystem notification interface, fsnotify, which will be
      used by inotify, dnotify, and eventually fanotify is really starting to
      clutter the fs directory.  This patch simply moves inotify and dnotify into
      fs/notify/inotify and fs/notify/dnotify respectively to make both current fs/
      and future notification tidier.
      Signed-off-by: NEric Paris <eparis@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      272eb014
    • D
      fs/block_dev.c: __read_mostly improvement and sb_is_blkdev_sb utilization · c2acf7b9
      Denis ChengRq 提交于
      - iget5_locked in bdget really needs blockdev_superblock, instead of
        bd_mnt, so bd_mnt could be just a local variable;
      
      - blockdev_superblock really needs __read_mostly, while local var bd_mnt
        not;
      
      - make use of sb_is_blkdev_sb in bd_forget, instead of direct reference
        to blockdev_superblock.
      Signed-off-by: NDenis ChengRq <crquan@gmail.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      c2acf7b9
    • A
      kill ->dir_notify() · 6badd79b
      Al Viro 提交于
      Remove the hopelessly misguided ->dir_notify().  The only instance (cifs)
      has been broken by design from the very beginning; the objects it creates
      are never destroyed, keep references to struct file they can outlive, nothing
      that could possibly evict them exists on close(2) path *and* no locking
      whatsoever is done to prevent races with close(), should the previous, er,
      deficiencies someday be dealt with.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      6badd79b