xfs: clean up xlog_align
PATCH 1/1 xfs: clean up xlog_align
Add suggested cleanups to commit 29db3370a1369541d58d692fbfb168b8a0bd7f41 from review that didn't end up being commited.
fs/xfs/xfs_log_recover.c +3 -8
@@ -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); }
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 2 lines · Christoph Hellwig
Add suggested cleanups to commit
29db3370a1369541d58d692fbfb168b8a0bd7f41from review that didn't end up being commited.
Whoops. I said I was going to change it to be that way but I guess that didn't happen. Sorry about that.
I do like this way better.
Quoted 1 line
Signed-off-by Christoph Hellwig <[email protected]>
fs/xfs/xfs_log_recover.c xlog_align(
Quoted 5 lines
Index:
xfs/fs/xfs/xfs_log_recover.c
===================================================================fs/xfs/xfs_log_recover.c +0
-0@@ -132,15 +132,10 @@ xlog_align(
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs