From: Linus Torvalds Date: Mon, 29 Nov 2010 22:11:08 +0000 (-0800) Subject: Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=aa3fc52546b847f590d86a093afd863ff9081628;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git Merge git://git./linux/kernel/git/mason/btrfs-unstable * git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: (24 commits) Btrfs: don't use migrate page without CONFIG_MIGRATION Btrfs: deal with DIO bios that span more than one ordered extent Btrfs: setup blank root and fs_info for mount time Btrfs: fix fiemap Btrfs - fix race between btrfs_get_sb() and umount Btrfs: update inode ctime when using links Btrfs: make sure new inode size is ok in fallocate Btrfs: fix typo in fallocate to make it honor actual size Btrfs: avoid NULL pointer deref in try_release_extent_buffer Btrfs: make btrfs_add_nondir take parent inode as an argument Btrfs: hold i_mutex when calling btrfs_log_dentry_safe Btrfs: use dget_parent where we can UPDATED Btrfs: fix more ESTALE problems with NFS Btrfs: handle NFS lookups properly btrfs: make 1-bit signed fileds unsigned btrfs: Show device attr correctly for symlinks btrfs: Set file size correctly in file clone btrfs: Check if dest_offset is block-size aligned before cloning file Btrfs: handle the space_cache option properly btrfs: Fix early enospc because 'unused' calculated with wrong sign. ... --- aa3fc52546b847f590d86a093afd863ff9081628 diff --cc fs/btrfs/inode.c index 558cac2dfa5,0f34cae0a63..8039390bd6a --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@@ -4803,9 -4802,9 +4802,9 @@@ static int btrfs_link(struct dentry *ol } btrfs_set_trans_block_group(trans, dir); - atomic_inc(&inode->i_count); + ihold(inode); - err = btrfs_add_nondir(trans, dentry, inode, 1, index); + err = btrfs_add_nondir(trans, dir, dentry, inode, 1, index); if (err) { drop_inode = 1; diff --cc fs/btrfs/super.c index 8299a25ffc8,47bf67cbe6b..dbb51ea7a13 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@@ -675,9 -711,11 +708,11 @@@ error_s error = PTR_ERR(s); error_close_devices: btrfs_close_devices(fs_devices); + kfree(fs_info); + kfree(tree_root); error_free_subvol_name: kfree(subvol_name); - return error; + return ERR_PTR(error); } static int btrfs_remount(struct super_block *sb, int *flags, char *data)