This commit is contained in:
@@ -393,8 +393,27 @@ static int look_name_space_map(NW_VOL *v, DEV_NAMESPACE_MAP *dnm,
|
||||
int k=-1;
|
||||
while (++k < v->maps_count) {
|
||||
mp=v->dev_namespace_maps[k];
|
||||
if (mp->dev == dnm->dev && mp->namespace == dnm->namespace)
|
||||
return(k);
|
||||
if (mp->dev == dnm->dev) {
|
||||
/*
|
||||
* VOL_OPTION_ONE_DEV encodes handles as the raw 32-bit inode:
|
||||
*
|
||||
* handle = inode
|
||||
*
|
||||
* In that mode there is no room in the handle for the dev/namespace
|
||||
* map index. All namespaces on this one Unix device therefore have
|
||||
* to share the same map entry. Otherwise a volume with both 'o' and
|
||||
* 'O' set can map the DOS root entry, but later OS/2 namespace lookups
|
||||
* fail with:
|
||||
*
|
||||
* Cannot map inode=..., dev=..., namespace=4 to vol=... handle
|
||||
*
|
||||
* Non-ONE_DEV volumes keep the old behaviour and still distinguish
|
||||
* mappings by both device and namespace.
|
||||
*/
|
||||
if ((v->options & VOL_OPTION_ONE_DEV)
|
||||
|| mp->namespace == dnm->namespace)
|
||||
return(k);
|
||||
}
|
||||
}
|
||||
if (do_insert && v->maps_count < v->max_maps_count) {
|
||||
/* now do insert the new map */
|
||||
|
||||
Reference in New Issue
Block a user