1. 02 Jan, 2009 31 commits
  2. 31 Dec, 2008 9 commits
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 · b58602a4
      Linus Torvalds authored
      * '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
    • Dave Kleikamp's avatar
      nfsd race fixes: jfs · 1f3403fa
      Dave Kleikamp authored
      jfs version of Al Viro's nfsd race patches
      Signed-off-by: default avatarDave Kleikamp <shaggy@linux.vnet.ibm.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      1f3403fa
    • Al Viro's avatar
      nfsd race fixes: reiserfs · c1eaa26b
      Al Viro authored
      ... and the same for reiserfs.  The difference here is that we need
      insert_inode_locked4() to match iget5_locked().
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      c1eaa26b
    • Al Viro's avatar
      nfsd race fixes: ext4 · 6b38e842
      Al Viro authored
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      6b38e842
    • Al Viro's avatar
      nfsd race fixes: ext3 · c38012da
      Al Viro authored
      ext3 analog of the previous patch
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      c38012da
    • Al Viro's avatar
      nfsd race fixes: ext2 · 41080b5a
      Al Viro authored
      * 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: default avatarAl Viro <viro@zeniv.linux.org.uk>
      41080b5a
    • Al Viro's avatar
      nfsd/create race fixes, infrastructure · 261bca86
      Al Viro authored
      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: default avatarAl Viro <viro@zeniv.linux.org.uk>
      261bca86
    • Eric Paris's avatar
      filesystem notification: create fs/notify to contain all fs notification · 272eb014
      Eric Paris authored
      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: default avatarEric Paris <eparis@redhat.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      272eb014
    • Denis ChengRq's avatar
      fs/block_dev.c: __read_mostly improvement and sb_is_blkdev_sb utilization · c2acf7b9
      Denis ChengRq authored
      - 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: default avatarDenis ChengRq <crquan@gmail.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      c2acf7b9