From: Linus Torvalds Date: Sat, 30 Oct 2010 16:05:48 +0000 (-0700) Subject: Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs... X-Git-Tag: v2.6.37-rc1~19 X-Git-Url: https://bbs.cooldavid.org/git/?p=net-next-2.6.git;a=commitdiff_plain;h=925d169f5b86fe57e2f5264ea574cce9a89b719d Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: (39 commits) Btrfs: deal with errors from updating the tree log Btrfs: allow subvol deletion by unprivileged user with -o user_subvol_rm_allowed Btrfs: make SNAP_DESTROY async Btrfs: add SNAP_CREATE_ASYNC ioctl Btrfs: add START_SYNC, WAIT_SYNC ioctls Btrfs: async transaction commit Btrfs: fix deadlock in btrfs_commit_transaction Btrfs: fix lockdep warning on clone ioctl Btrfs: fix clone ioctl where range is adjacent to extent Btrfs: fix delalloc checks in clone ioctl Btrfs: drop unused variable in block_alloc_rsv Btrfs: cleanup warnings from gcc 4.6 (nonbugs) Btrfs: Fix variables set but not read (bugs found by gcc 4.6) Btrfs: Use ERR_CAST helpers Btrfs: use memdup_user helpers Btrfs: fix raid code for removing missing drives Btrfs: Switch the extent buffer rbtree into a radix tree Btrfs: restructure try_release_extent_buffer() Btrfs: use the flusher threads for delalloc throttling Btrfs: tune the chunk allocation to 5% of the FS as metadata ... Fix up trivial conflicts in fs/btrfs/super.c and fs/fs-writeback.c, and remove use of INIT_RCU_HEAD in fs/btrfs/extent_io.c (that init macro was useless and removed in commit 5e8067adfdba: "rcu head remove init") --- 925d169f5b86fe57e2f5264ea574cce9a89b719d diff --cc fs/btrfs/super.c index ebe46c62874,718b10de204..8299a25ffc8 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@@ -665,8 -680,7 +677,7 @@@ error_close_devices btrfs_close_devices(fs_devices); error_free_subvol_name: kfree(subvol_name); - error: - return error; + return ERR_PTR(error); } static int btrfs_remount(struct super_block *sb, int *flags, char *data) diff --cc fs/fs-writeback.c index f027382b54b,1e23c33ea5c..3d06ccc953a --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@@ -1102,9 -1091,22 +1103,20 @@@ void writeback_inodes_sb_nr(struct supe bdi_queue_work(sb->s_bdi, &work); wait_for_completion(&done); } + EXPORT_SYMBOL(writeback_inodes_sb_nr); + + /** + * writeback_inodes_sb - writeback dirty inodes from given super_block + * @sb: the superblock + * + * Start writeback on some inodes on this super_block. No guarantees are made + * on how many (if any) will be written, and this function does not wait + * for IO completion of submitted IO. + */ + void writeback_inodes_sb(struct super_block *sb) + { - return writeback_inodes_sb_nr(sb, global_page_state(NR_FILE_DIRTY) + - global_page_state(NR_UNSTABLE_NFS) + - (inodes_stat.nr_inodes - inodes_stat.nr_unused)); ++ return writeback_inodes_sb_nr(sb, get_nr_dirty_pages()); + } EXPORT_SYMBOL(writeback_inodes_sb); /**