[dm-devel] [PATCH] 2.4: dm-snapshot.c: Call unlockfs() on error from register_snapshot()

Kevin Corry corryk at us.ibm.com
Mon Feb 17 20:52:01 UTC 2003


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).

--- linux-2.4.20a/drivers/md/dm-snapshot.c	2003/01/21 17:04:25
+++ linux-2.4.20b/drivers/md/dm-snapshot.c	2003/02/17 16:20:31
@@ -532,6 +532,9 @@
 	return 0;
 
       bad_free2:
+#if LVM_VFS_ENHANCEMENT
+	unlockfs(s->origin->dev);
+#endif
 	s->store.destroy(&s->store);
 
       bad_free1:





More information about the dm-devel mailing list