From b4de9dc5b030c04cfee5514ef8ca4f4497713699 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. Reviewed-on: http://gerrit.openafs.org/9970 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit ba42758ce218e8985adc0129d0ee3ffa8690537f) Change-Id: I01a0506fefce299aa7dc799e3ff494dfbeb2b894 Reviewed-on: http://gerrit.openafs.org/10178 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Mark Vitale Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand --- 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 f525e63ce..c835e0142 100644 --- a/src/volser/dumpstuff.c +++ b/src/volser/dumpstuff.c @@ -1423,20 +1423,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