diff options
| author | Greg Lehey <grog@FreeBSD.org> | 1999-03-13 07:35:40 +0000 |
|---|---|---|
| committer | Greg Lehey <grog@FreeBSD.org> | 1999-03-13 07:35:40 +0000 |
| commit | 5c6d2cb54380a68f4423edfdabd6470ff7a1b01c (patch) | |
| tree | 232933323d327bfd3d0a849f0f876636c16b0ddf /sys/dev | |
| parent | 301851b63038f5a1db69f73b2bb3ffac06a9fe61 (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/vinum/vinumlock.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/dev/vinum/vinumlock.c b/sys/dev/vinum/vinumlock.c index 080942484494..d0d47f1cc21b 100644 --- a/sys/dev/vinum/vinumlock.c +++ b/sys/dev/vinum/vinumlock.c @@ -53,6 +53,13 @@ lockdrive(struct drive *drive) int error; /* XXX get rid of drive->flags |= VF_LOCKING; */ + if ((drive->flags & VF_LOCKED) /* it's locked */ + &&(drive->pid == curproc->p_pid)) { /* by us! */ + log(LOG_WARNING, + "vinum lockdrive: already locking %s\n", + drive->label.name); + return 0; + } while ((drive->flags & VF_LOCKED) != 0) { /* * There are problems sleeping on a unique identifier, |
