diff options
Diffstat (limited to 'fs/xfs/xfs_log_recover.c')
-rw-r--r-- | fs/xfs/xfs_log_recover.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 14a69aec2c0b..9ac5cfab27b9 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c | |||
@@ -132,15 +132,10 @@ xlog_align( | |||
132 | int nbblks, | 132 | int nbblks, |
133 | xfs_buf_t *bp) | 133 | xfs_buf_t *bp) |
134 | { | 134 | { |
135 | xfs_daddr_t offset; | 135 | xfs_daddr_t offset = blk_no & ((xfs_daddr_t)log->l_sectBBsize - 1); |
136 | xfs_caddr_t ptr; | ||
137 | 136 | ||
138 | offset = blk_no & ((xfs_daddr_t) log->l_sectBBsize - 1); | 137 | ASSERT(BBTOB(offset + nbblks) <= XFS_BUF_SIZE(bp)); |
139 | ptr = XFS_BUF_PTR(bp) + BBTOB(offset); | 138 | return XFS_BUF_PTR(bp) + BBTOB(offset); |
140 | |||
141 | ASSERT(ptr + BBTOB(nbblks) <= XFS_BUF_PTR(bp) + XFS_BUF_SIZE(bp)); | ||
142 | |||
143 | return ptr; | ||
144 | } | 139 | } |
145 | 140 | ||
146 | 141 | ||
@@ -3203,7 +3198,7 @@ xlog_recover_process_one_iunlink( | |||
3203 | int error; | 3198 | int error; |
3204 | 3199 | ||
3205 | ino = XFS_AGINO_TO_INO(mp, agno, agino); | 3200 | ino = XFS_AGINO_TO_INO(mp, agno, agino); |
3206 | error = xfs_iget(mp, NULL, ino, 0, 0, &ip, 0); | 3201 | error = xfs_iget(mp, NULL, ino, 0, 0, &ip); |
3207 | if (error) | 3202 | if (error) |
3208 | goto fail; | 3203 | goto fail; |
3209 | 3204 | ||