From: Ilya Dryomov Date: Wed, 9 Nov 2011 12:41:22 +0000 (+0200) Subject: Btrfs: rework error handling in btrfs_mount() X-Git-Tag: v3.2-rc2~22^2~9^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04d21a244fdf79d0ac892eaaa9a46b682467277c;p=pandora-kernel.git Btrfs: rework error handling in btrfs_mount() Commits 6c41761f and 45ea6095 introduced the possibility of NULL pointer dereference on error paths, also we would leave all devices busy and leak fs_info with all sub-structures on error when trying to mount an already mounted fs to a different directory. Fix this by doing all allocations before trying to open any of the devices, adjust error path for mount-already-mounted-fs case. Signed-off-by: Ilya Dryomov --- Reading git-diff-tree failed