diff options
author | Christoph Hellwig <hch@infradead.org> | 2010-05-10 17:28:14 +0000 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2010-05-28 14:58:36 -0500 |
commit | fdc07f44c891d3fdee7722a03e3881614a293b3c (patch) | |
tree | aed7fd2fac1df3d4d01c679c18ce2fdba31025c3 /fs/xfs/xfs_log_recover.c | |
parent | 025101dca4480eff9da948405e872d5115030850 (diff) | |
download | lwn-fdc07f44c891d3fdee7722a03e3881614a293b3c.tar.gz lwn-fdc07f44c891d3fdee7722a03e3881614a293b3c.zip |
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>
Diffstat (limited to 'fs/xfs/xfs_log_recover.c')
-rw-r--r-- | fs/xfs/xfs_log_recover.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 14a69aec2c0b..ed0684cc50ee 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c @@ -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); } |