diff options
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, |
