Skip to content

Commit

Permalink
xfs: clean up xlog_align
Browse files Browse the repository at this point in the history
Add suggested cleanups to commit 29db3370a1369541d58d692fbfb168b8a0bd7f41
from review that didn't end up being commited.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Alex Elder <[email protected]>
  • Loading branch information
Christoph Hellwig authored and Alex Elder committed May 28, 2010
1 parent 025101d commit fdc07f4
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions fs/xfs/xfs_log_recover.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}


Expand Down

0 comments on commit fdc07f4

Please sign in to comment.