提交 f1c63b73 编写于 作者: C Christoph Hellwig 提交者: Alex Elder

xfs: do not do pointer arithmetic on extent records

We need to call xfs_iext_get_ext for the previous extent to get a
valid pointer, and can't just do pointer arithmetics as they might
be in different pages.
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Reviewed-by: NLachlan McIlroy <lmcilroy@redhat.com>
Signed-off-by: NAlex Elder <aelder@sgi.com>
上级 00239acf
......@@ -5143,9 +5143,12 @@ xfs_bunmapi(
*/
ASSERT(bno >= del.br_blockcount);
bno -= del.br_blockcount;
if (bno < got.br_startoff) {
if (--lastx >= 0)
xfs_bmbt_get_all(--ep, &got);
if (got.br_startoff > bno) {
if (--lastx >= 0) {
ep = xfs_iext_get_ext(ifp,
lastx);
xfs_bmbt_get_all(ep, &got);
}
}
continue;
} else if (del.br_state == XFS_EXT_UNWRITTEN) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册