From: Linus Torvalds Date: Tue, 10 Aug 2010 18:26:52 +0000 (-0700) Subject: Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 X-Git-Tag: v2.6.36-rc1~304 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5f248c9c251c60af3403902b26e08de43964ea0b;p=profile%2Fivi%2Fkernel-x86-ivi.git Merge branch 'for-linus' of git://git./linux/kernel/git/viro/vfs-2.6 * '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 --- 5f248c9c251c60af3403902b26e08de43964ea0b diff --cc fs/9p/v9fs_vfs.h index f47c6bb,3d056fe..88418c4 --- a/fs/9p/v9fs_vfs.h +++ b/fs/9p/v9fs_vfs.h @@@ -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); diff --cc fs/nilfs2/dir.c index b60277b,d14e3b9..cb003c8 --- a/fs/nilfs2/dir.c +++ b/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; diff --cc fs/nilfs2/recovery.c index 83e3d8c,2f11f08..d0c35ef --- a/fs/nilfs2/recovery.c +++ b/fs/nilfs2/recovery.c @@@ -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; diff --cc fs/nilfs2/super.c index 26078b3,7c7572a..1fa86b9 --- a/fs/nilfs2/super.c +++ b/fs/nilfs2/super.c @@@ -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;