diff options
| author | rica <none@none> | 2006-06-02 08:41:08 -0700 |
|---|---|---|
| committer | rica <none@none> | 2006-06-02 08:41:08 -0700 |
| commit | 42bc57c4f7b4cbbba239980a8a7e4d01fa2dec79 (patch) | |
| tree | 565bc769bcc3c6baf14c9fcc4634fe13a4770e35 /usr/src | |
| parent | 8e6a2a040587479821d1e682a28bcef7e75f19a6 (diff) | |
| download | illumos-joyent-42bc57c4f7b4cbbba239980a8a7e4d01fa2dec79.tar.gz | |
6403267 address remaining issues raised during TX code reviews
Diffstat (limited to 'usr/src')
| -rw-r--r-- | usr/src/uts/common/os/zone.c | 14 | ||||
| -rw-r--r-- | usr/src/uts/common/sys/zone.h | 12 |
2 files changed, 13 insertions, 13 deletions
diff --git a/usr/src/uts/common/os/zone.c b/usr/src/uts/common/os/zone.c index 45f2b6e5ab..e771eb6f13 100644 --- a/usr/src/uts/common/os/zone.c +++ b/usr/src/uts/common/os/zone.c @@ -1655,23 +1655,23 @@ zone_t * zone_find_by_label(const ts_label_t *label) { zone_t *zone; + zone_status_t status; mutex_enter(&zonehash_lock); if ((zone = zone_find_all_by_label(label)) == NULL) { mutex_exit(&zonehash_lock); return (NULL); } - mutex_enter(&zone_status_lock); - if (zone_status_get(zone) > ZONE_IS_DOWN) { + + status = zone_status_get(zone); + if (status > ZONE_IS_DOWN) { /* * For all practical purposes the zone doesn't exist. */ - mutex_exit(&zone_status_lock); - zone = NULL; - } else { - mutex_exit(&zone_status_lock); - zone_hold(zone); + mutex_exit(&zonehash_lock); + return (NULL); } + zone_hold(zone); mutex_exit(&zonehash_lock); return (zone); } diff --git a/usr/src/uts/common/sys/zone.h b/usr/src/uts/common/sys/zone.h index 43ccc07668..35861d86b4 100644 --- a/usr/src/uts/common/sys/zone.h +++ b/usr/src/uts/common/sys/zone.h @@ -109,9 +109,9 @@ typedef struct { caddr32_t extended_error; caddr32_t zfsbuf; size32_t zfsbufsz; - int match; - int doi; - caddr32_t label; + int match; /* match level */ + uint32_t doi; /* DOI for label */ + caddr32_t label; /* label associated with zone */ } zone_def32; #endif typedef struct { @@ -125,7 +125,7 @@ typedef struct { const char *zfsbuf; size_t zfsbufsz; int match; /* match level */ - int doi; /* DOI for label */ + uint32_t doi; /* DOI for label */ const bslabel_t *label; /* label associated with zone */ } zone_def; @@ -307,8 +307,8 @@ typedef struct zone { */ list_t zone_datasets; /* list of datasets */ - ts_label_t *zone_slabel; - int zone_match; + ts_label_t *zone_slabel; /* zone sensitivity label */ + int zone_match; /* require label match for packets */ tsol_mlp_list_t zone_mlps; /* MLPs on zone-private addresses */ } zone_t; |
