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)
committerMike Snitzer <snitzer@redhat.com>
Tue, 10 Dec 2013 21:35:12 +0000 (16:35 -0500)
commit020cc3b5e28c2e24f59f53a9154faf08564f308e
treed4bbed0ba0c780785187c9954658c723ed1973ac
parent4a02b34e0cf1d0d0dd3737702841da4bf615a50a
dm thin: always fallback the pool mode if commit fails

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>
Cc: stable@vger.kernel.org
drivers/md/dm-thin.c