From ba42758ce218e8985adc0129d0ee3ffa8690537f Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Mon, 3 Jun 2013 16:28:44 -0500 Subject: [PATCH] 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 --- src/volser/dumpstuff.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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", -- 2.39.5