In snapshot_ctr(), if the call to register_snapshot() fails, we need to unlock
the origin's filesystem (if the VFS-lock patch has been applied).

[Kevin Corry]

--- diff/drivers/md/dm-snapshot.c	2003-02-13 10:42:28.000000000 +0000
+++ source/drivers/md/dm-snapshot.c	2003-02-25 14:44:11.000000000 +0000
@@ -532,6 +532,9 @@
 	return 0;
 
       bad_free2:
+#if LVM_VFS_ENHANCEMENT
+	unlockfs(s->origin->dev);
+#endif
 	s->store.destroy(&s->store);
 
       bad_free1:
--- diff/drivers/md/dm-table.c	2003-02-13 10:42:19.000000000 +0000
+++ source/drivers/md/dm-table.c	2003-02-25 14:44:11.000000000 +0000
@@ -523,7 +523,7 @@
 	tgt->type = dm_get_target_type(type);
 	if (!tgt->type) {
 		tgt->error = "unknown target type";
-		return r;
+		return -EINVAL;
 	}
 
 	tgt->table = t;
@@ -536,6 +536,7 @@
 	 */
 	if (!adjoin(t, tgt)) {
 		tgt->error = "Gap in table";
+		r = -EINVAL;
 		goto bad;
 	}