---
 drivers/md/dm-thin.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Index: linux-3.1-rc9/drivers/md/dm-thin.c
===================================================================
--- linux-3.1-rc9.orig/drivers/md/dm-thin.c
+++ linux-3.1-rc9/drivers/md/dm-thin.c
@@ -478,7 +478,7 @@ struct pool {
 
 	unsigned zero_new_blocks:1;
 	unsigned low_water_triggered:1;	/* A dm event has been sent */
-	unsigned no_free_space:1;	/* An -ENOSPC warning has been issued */
+	unsigned no_free_space:1;	/* An ENOSPC warning has been issued */
 
 	struct bio_prison *prison;
 	struct dm_kcopyd_client *copier;
@@ -2315,7 +2315,9 @@ static int thin_status(struct dm_target 
 	char buf[BDEVNAME_SIZE];
 	struct thin_c *tc = ti->private;
 
-	if (tc->td) {
+	if (!tc->td)
+		DMEMIT("-");
+	else {
 		switch (type) {
 		case STATUSTYPE_INFO:
 			r = dm_thin_get_mapped_count(tc->td, &mapped);
@@ -2340,8 +2342,6 @@ static int thin_status(struct dm_target 
 			       (unsigned long) tc->dev_id);
 			break;
 		}
-	} else
-		DMEMIT("-");
 
 	return 0;
 }
