Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
Linus Torvalds [Tue, 10 Aug 2010 18:26:52 +0000 (11:26 -0700)]
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (96 commits)
  no need for list_for_each_entry_safe()/resetting with superblock list
  Fix sget() race with failing mount
  vfs: don't hold s_umount over close_bdev_exclusive() call
  sysv: do not mark superblock dirty on remount
  sysv: do not mark superblock dirty on mount
  btrfs: remove junk sb_dirt change
  BFS: clean up the superblock usage
  AFFS: wait for sb synchronization when needed
  AFFS: clean up dirty flag usage
  cifs: truncate fallout
  mbcache: fix shrinker function return value
  mbcache: Remove unused features
  add f_flags to struct statfs(64)
  pass a struct path to vfs_statfs
  update VFS documentation for method changes.
  All filesystems that need invalidate_inode_buffers() are doing that explicitly
  convert remaining ->clear_inode() to ->evict_inode()
  Make ->drop_inode() just return whether inode needs to be dropped
  fs/inode.c:clear_inode() is gone
  fs/inode.c:evict() doesn't care about delete vs. non-delete paths now
  ...

Fix up trivial conflicts in fs/nilfs2/super.c

44 files changed:
1  2 
drivers/staging/pohmelfs/inode.c
fs/9p/v9fs_vfs.h
fs/9p/vfs_inode.c
fs/9p/vfs_super.c
fs/block_dev.c
fs/cifs/cifsfs.c
fs/cifs/inode.c
fs/compat.c
fs/ext3/inode.c
fs/ext3/super.c
fs/ext4/ext4.h
fs/ext4/ialloc.c
fs/ext4/inode.c
fs/ext4/super.c
fs/ext4/xattr.c
fs/freevxfs/vxfs_super.c
fs/fs-writeback.c
fs/fuse/dir.c
fs/gfs2/aops.c
fs/gfs2/super.c
fs/ncpfs/inode.c
fs/nfs/inode.c
fs/nfs/internal.h
fs/nfs/super.c
fs/nfsd/nfs4xdr.c
fs/nfsd/vfs.c
fs/nilfs2/dir.c
fs/nilfs2/nilfs.h
fs/nilfs2/recovery.c
fs/nilfs2/super.c
fs/ocfs2/dlmfs/dlmfs.c
fs/ocfs2/super.c
fs/proc/base.c
fs/quota/dquot.c
fs/reiserfs/inode.c
fs/ubifs/super.c
fs/udf/file.c
fs/udf/super.c
include/linux/buffer_head.h
include/linux/ext3_fs.h
include/linux/fs.h
include/linux/mm.h
include/linux/reiserfs_fs.h
mm/shmem.c

Simple merge
@@@ -52,10 -52,9 +52,10 @@@ void v9fs_destroy_inode(struct inode *i
  #endif
  
  struct inode *v9fs_get_inode(struct super_block *sb, int mode);
- void v9fs_clear_inode(struct inode *inode);
+ void v9fs_evict_inode(struct inode *inode);
  ino_t v9fs_qid2ino(struct p9_qid *qid);
  void v9fs_stat2inode(struct p9_wstat *, struct inode *, struct super_block *);
 +void v9fs_stat2inode_dotl(struct p9_stat_dotl *, struct inode *);
  int v9fs_dir_release(struct inode *inode, struct file *filp);
  int v9fs_file_open(struct inode *inode, struct file *file);
  void v9fs_inode2stat(struct inode *inode, struct p9_wstat *stat);
Simple merge
Simple merge
diff --cc fs/block_dev.c
Simple merge
Simple merge
diff --cc fs/cifs/inode.c
Simple merge
diff --cc fs/compat.c
Simple merge
diff --cc fs/ext3/inode.c
Simple merge
diff --cc fs/ext3/super.c
Simple merge
diff --cc fs/ext4/ext4.h
Simple merge
Simple merge
diff --cc fs/ext4/inode.c
Simple merge
diff --cc fs/ext4/super.c
Simple merge
diff --cc fs/ext4/xattr.c
Simple merge
Simple merge
Simple merge
diff --cc fs/fuse/dir.c
Simple merge
diff --cc fs/gfs2/aops.c
Simple merge
diff --cc fs/gfs2/super.c
Simple merge
Simple merge
diff --cc fs/nfs/inode.c
Simple merge
Simple merge
diff --cc fs/nfs/super.c
Simple merge
Simple merge
diff --cc fs/nfsd/vfs.c
Simple merge
diff --cc fs/nilfs2/dir.c
@@@ -586,10 -574,10 +573,10 @@@ int nilfs_delete_entry(struct nilfs_dir
        if (pde)
                from = (char *)pde - (char *)page_address(page);
        lock_page(page);
-       err = nilfs_prepare_chunk(page, mapping, from, to);
+       err = nilfs_prepare_chunk(page, from, to);
        BUG_ON(err);
        if (pde)
 -              pde->rec_len = cpu_to_le16(to - from);
 +              pde->rec_len = nilfs_rec_len_to_disk(to - from);
        dir->inode = 0;
        nilfs_commit_chunk(page, mapping, from, to);
        inode->i_ctime = inode->i_mtime = CURRENT_TIME;
Simple merge
@@@ -523,13 -505,16 +523,16 @@@ static int nilfs_recover_dsync_blocks(s
                }
  
                pos = rb->blkoff << inode->i_blkbits;
-               page = NULL;
-               err = block_write_begin(NULL, inode->i_mapping, pos, blocksize,
-                                       0, &page, NULL, nilfs_get_block);
-               if (unlikely(err))
+               err = block_write_begin(inode->i_mapping, pos, blocksize,
+                                       0, &page, nilfs_get_block);
+               if (unlikely(err)) {
+                       loff_t isize = inode->i_size;
+                       if (pos + blocksize > isize)
+                               vmtruncate(inode, isize);
                        goto failed_inode;
+               }
  
 -              err = nilfs_recovery_copy_block(sbi, rb, page);
 +              err = nilfs_recovery_copy_block(nilfs, rb, page);
                if (unlikely(err))
                        goto failed_page;
  
@@@ -171,24 -159,7 +171,7 @@@ void nilfs_destroy_inode(struct inode *
        kmem_cache_free(nilfs_inode_cachep, NILFS_I(inode));
  }
  
- static void nilfs_clear_inode(struct inode *inode)
- {
-       struct nilfs_inode_info *ii = NILFS_I(inode);
-       /*
-        * Free resources allocated in nilfs_read_inode(), here.
-        */
-       BUG_ON(!list_empty(&ii->i_dirty));
-       brelse(ii->i_bh);
-       ii->i_bh = NULL;
-       if (test_bit(NILFS_I_BMAP, &ii->i_state))
-               nilfs_bmap_clear(ii->i_bmap);
-       nilfs_btnode_cache_clear(&ii->i_btnode_cache);
- }
 -static int nilfs_sync_super(struct nilfs_sb_info *sbi, int dupsb)
 +static int nilfs_sync_super(struct nilfs_sb_info *sbi, int flag)
  {
        struct the_nilfs *nilfs = sbi->s_nilfs;
        int err;
Simple merge
Simple merge
diff --cc fs/proc/base.c
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc fs/udf/file.c
Simple merge
diff --cc fs/udf/super.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc mm/shmem.c
Simple merge