dm: take care to copy the space map roots before locking the superblock
authorJoe Thornber <ejt@redhat.com>
Thu, 27 Mar 2014 14:13:23 +0000 (14:13 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 May 2014 11:32:55 +0000 (13:32 +0200)
commit84fb0b3cbf66f2956cf03682601da9f650d54b4f
tree17daa185dc48b741f1c4da04b5345a7ac702d6dc
parentbe8e19196cbc229cd40f34545bf3dbb7dbb83df2
dm: take care to copy the space map roots before locking the superblock

commit 5a32083d03fb543f63489b2946c4948398579ba0 upstream.

In theory copying the space map root can fail, but in practice it never
does because we're careful to check what size buffer is needed.

But make certain we're able to copy the space map roots before
locking the superblock.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-cache-metadata.c
drivers/md/dm-thin-metadata.c