From: Andrew Deason Date: Mon, 3 Jun 2013 21:28:44 +0000 (-0500) Subject: volser: Use the new IH_CREATE_INIT function X-Git-Tag: upstream/1.8.0_pre1^2~1066 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=ba42758ce218e8985adc0129d0ee3ffa8690537f;p=packages%2Fo%2Fopenafs.git volser: Use the new IH_CREATE_INIT function Use IH_CREATE_INIT when restoring volume data, so we don't open each restored data file twice. Change-Id: I67b3df1c5777a6b022644b042f405dbd6a1976a0 Reviewed-on: http://gerrit.openafs.org/9970 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- diff --git a/src/volser/dumpstuff.c b/src/volser/dumpstuff.c index 55efa695d..5b4176db7 100644 --- a/src/volser/dumpstuff.c +++ b/src/volser/dumpstuff.c @@ -1419,20 +1419,20 @@ ReadVnodes(struct iod *iodp, Volume * vp, int incremental, } saw_f = 1; - ino = - IH_CREATE(V_linkHandle(vp), V_device(vp), + tmpH = + IH_CREATE_INIT(V_linkHandle(vp), V_device(vp), VPartitionPath(V_partition(vp)), nearInode, V_parentId(vp), vnodeNumber, vnode->uniquifier, vnode->dataVersion); - if (!VALID_INO(ino)) { + if (!tmpH) { Log("1 Volser: ReadVnodes: IH_CREATE: %s - restore aborted\n", afs_error_message(errno)); V_needsSalvaged(vp) = 1; return VOLSERREAD_DUMPERROR; } + ino = tmpH->ih_ino; nearInode = ino; VNDISK_SET_INO(vnode, ino); - IH_INIT(tmpH, vp->device, V_parentId(vp), ino); fdP = IH_OPEN(tmpH); if (fdP == NULL) { Log("1 Volser: ReadVnodes: IH_OPEN: %s - restore aborted\n",