2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-11-20 00:26:39 +08:00

xfs: clean up xlog_align

Add suggested cleanups to commit 29db3370a1369541d58d692fbfb168b8a0bd7f41
from review that didn't end up being commited.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
This commit is contained in:
Christoph Hellwig 2010-05-10 17:28:14 +00:00 committed by Alex Elder
parent 025101dca4
commit fdc07f44c8

View File

@ -132,15 +132,10 @@ xlog_align(
int nbblks,
xfs_buf_t *bp)
{
xfs_daddr_t offset;
xfs_caddr_t ptr;
xfs_daddr_t offset = blk_no & ((xfs_daddr_t)log->l_sectBBsize - 1);
offset = blk_no & ((xfs_daddr_t) log->l_sectBBsize - 1);
ptr = XFS_BUF_PTR(bp) + BBTOB(offset);
ASSERT(ptr + BBTOB(nbblks) <= XFS_BUF_PTR(bp) + XFS_BUF_SIZE(bp));
return ptr;
ASSERT(BBTOB(offset + nbblks) <= XFS_BUF_SIZE(bp));
return XFS_BUF_PTR(bp) + BBTOB(offset);
}