Commit c8ba8d59 authored by Dave Kleikamp's avatar Dave Kleikamp

Merge jfs@jfs.bkbits.net:linux-2.5

into austin.ibm.com:/shaggy/bk/jfs-2.5
parents 07f0a148 9cf7792d
...@@ -225,8 +225,16 @@ struct metapage *__get_metapage(struct inode *inode, unsigned long lblock, ...@@ -225,8 +225,16 @@ struct metapage *__get_metapage(struct inode *inode, unsigned long lblock,
if (absolute) if (absolute)
mapping = inode->i_sb->s_bdev->bd_inode->i_mapping; mapping = inode->i_sb->s_bdev->bd_inode->i_mapping;
else else {
/*
* If an nfs client tries to read an inode that is larger
* than any existing inodes, we may try to read past the
* end of the inode map
*/
if ((lblock << inode->i_blkbits) >= inode->i_size)
return NULL;
mapping = inode->i_mapping; mapping = inode->i_mapping;
}
hash_ptr = meta_hash(mapping, lblock); hash_ptr = meta_hash(mapping, lblock);
again: again:
......
...@@ -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