dm thin: always fallback the pool mode if commit fails
authorJoe Thornber <ejt@redhat.com>
Wed, 4 Dec 2013 20:05:36 +0000 (15:05 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Dec 2013 15:49:05 +0000 (07:49 -0800)
commita016a0dfee64bcf6f08cb0129574b91a280b092e
treef6194d801868e461e197ed4690928553bb81a625
parentc591d1144c46b18f026e06e59fc0e916c739c973
dm thin: always fallback the pool mode if commit fails

commit 020cc3b5e28c2e24f59f53a9154faf08564f308e upstream.

Rename commit_or_fallback() to commit().  Now all previous calls to
commit() will trigger the pool mode to fallback if the commit fails.

Also, check the error returned from commit() in alloc_data_block().

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-thin.c