[DRBD-cvs] r1593 - branches/drbd-0.7/drbd

svn at svn.drbd.org svn at svn.drbd.org
Fri Oct 15 19:21:10 CEST 2004


Author: lars
Date: 2004-10-15 19:21:07 +0200 (Fri, 15 Oct 2004)
New Revision: 1593

Modified:
   branches/drbd-0.7/drbd/drbd_fs.c
Log:
outch... moved it above the mutex, but still 'goto up(mutex)' in the error case...

Modified: branches/drbd-0.7/drbd/drbd_fs.c
===================================================================
--- branches/drbd-0.7/drbd/drbd_fs.c	2004-10-15 17:10:30 UTC (rev 1592)
+++ branches/drbd-0.7/drbd/drbd_fs.c	2004-10-15 17:21:07 UTC (rev 1593)
@@ -1005,7 +1005,7 @@
 	    && cmd != DRBD_IOCTL_GET_CONFIG
 	    && cmd != DRBD_IOCTL_GET_VERSION) {
 		err = -EPERM;
-		goto out;
+		goto out_unlocked;
 	}
 
 	if (mdev->cstate == Unconfigured) {
@@ -1013,7 +1013,7 @@
 		default:
 			/* oops, unknown IOCTL ?? */
 			err = -EINVAL;
-			goto out;
+			goto out_unlocked;
 
 		case DRBD_IOCTL_GET_CONFIG:
 		case DRBD_IOCTL_GET_VERSION:
@@ -1027,7 +1027,7 @@
 		case DRBD_IOCTL_UNCONFIG_NET:
 			/* no op, so "drbdadm down all" does not fail */
 			err = 0;
-			goto out;
+			goto out_unlocked;
 
 		/* the rest of them don't make sense if Unconfigured.
 		 * still, set an Unconfigured device Secondary
@@ -1042,7 +1042,7 @@
 		case DRBD_IOCTL_WAIT_SYNC:
 			err = (cmd == DRBD_IOCTL_SET_STATE && arg == Secondary)
 				    ? 0 : -ENXIO;
-			goto out;
+			goto out_unlocked;
 		}
 	}
 
@@ -1323,7 +1323,7 @@
 	default:
 		err = -EINVAL;
 	}
- out:
+ /* out: */
 	up(&mdev->device_mutex);
  out_unlocked:
 	return err;



More information about the drbd-cvs mailing list