From: Andrew Deason Date: Tue, 15 Nov 2011 19:18:48 +0000 (-0600) Subject: afs: Leave cellnum alone for explicit mtpt cell X-Git-Tag: upstream/1.6.1.pre1^2~81 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=d52f1a5038b66ca5dc82d71541701ebb794cbc0b;p=packages%2Fo%2Fopenafs.git afs: Leave cellnum alone for explicit mtpt cell When a mountpoint is given an explicit cell, don't alter cellnum. Cellnum represents the cell for the parent, and is used for determining whether or not we're crossing a cell boundary. Previously, this code forced the mount point to always be treated as foreign (for a mountpoint prefixed with a cell name), or to always be treated as local (for a mountpoint prefixed with a cell number). Reviewed-on: http://gerrit.openafs.org/6051 Reviewed-by: Marc Dionne Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit e14dec55e6600edb60ce5184b4ab1f646c68947b) Change-Id: I8d2b378a95533aabd65e7121000ce34238d728b7 Reviewed-on: http://gerrit.openafs.org/6123 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- diff --git a/src/afs/VNOPS/afs_vnop_lookup.c b/src/afs/VNOPS/afs_vnop_lookup.c index 46fc72dd8..580f78b1e 100644 --- a/src/afs/VNOPS/afs_vnop_lookup.c +++ b/src/afs/VNOPS/afs_vnop_lookup.c @@ -67,14 +67,14 @@ EvalMountData(char type, char *data, afs_uint32 states, afs_uint32 cellnum, /* Start by figuring out and finding the cell */ cpos = afs_strchr(data, ':'); /* if cell name present */ if (cpos) { + afs_uint32 mtptCellnum; volnamep = cpos + 1; *cpos = 0; - if ((afs_strtoi_r(data, &endptr, &cellnum) == 0) && - (endptr == cpos)) - tcell = afs_GetCell(cellnum, READ_LOCK); - else { + if ((afs_strtoi_r(data, &endptr, &mtptCellnum) == 0) && + (endptr == cpos)) { + tcell = afs_GetCell(mtptCellnum, READ_LOCK); + } else { tcell = afs_GetCellByName(data, READ_LOCK); - cellnum = 0; } *cpos = ':'; } else if (cellnum) {