Commit 9cf7792d authored by Dave Kleikamp's avatar Dave Kleikamp

JFS: Error path released metadata page it shouldn't have

Signed-off-by: default avatarDave Kleikamp <shaggy@austin.ibm.com>
parent be85adc2
...@@ -1071,8 +1071,10 @@ xtSplitUp(tid_t tid, ...@@ -1071,8 +1071,10 @@ xtSplitUp(tid_t tid,
*/ */
/* get/pin the parent page <sp> */ /* get/pin the parent page <sp> */
XT_GETPAGE(ip, parent->bn, smp, PSIZE, sp, rc); XT_GETPAGE(ip, parent->bn, smp, PSIZE, sp, rc);
if (rc) if (rc) {
goto errout2; XT_PUTPAGE(rcmp);
return rc;
}
/* /*
* The new key entry goes ONE AFTER the index of parent entry, * The new key entry goes ONE AFTER the index of parent entry,
...@@ -1106,8 +1108,10 @@ xtSplitUp(tid_t tid, ...@@ -1106,8 +1108,10 @@ xtSplitUp(tid_t tid,
rc = (sp->header.flag & BT_ROOT) ? rc = (sp->header.flag & BT_ROOT) ?
xtSplitRoot(tid, ip, split, &rmp) : xtSplitRoot(tid, ip, split, &rmp) :
xtSplitPage(tid, ip, split, &rmp, &rbn); xtSplitPage(tid, ip, split, &rmp, &rbn);
if (rc) if (rc) {
goto errout1; XT_PUTPAGE(smp);
return rc;
}
XT_PUTPAGE(smp); XT_PUTPAGE(smp);
/* keep new child page <rp> pinned */ /* keep new child page <rp> pinned */
...@@ -1170,19 +1174,6 @@ xtSplitUp(tid_t tid, ...@@ -1170,19 +1174,6 @@ xtSplitUp(tid_t tid,
XT_PUTPAGE(rmp); XT_PUTPAGE(rmp);
return 0; return 0;
/*
* If something fails in the above loop we were already walking back
* up the tree and the tree is now inconsistent.
* release all pages we're holding.
*/
errout1:
XT_PUTPAGE(smp);
errout2:
XT_PUTPAGE(rcmp);
return rc;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment