Use list_head infra-structure for buffer's log items list
Now that buffer's b_fspriv has been split, just replace the current singly linked list of xfs_log_items, by the list_head infrastructure. Also, remove the xfs_log_item argument from xfs_buf_resubmit_failed_buffers(), there is no need for this argument, once the log items can be walked through the list_head in the buffer. Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com> Reviewed-by: Bill O'Donnell <billodo@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> [darrick: minor style cleanups] Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
This commit is contained in:
committed by
Darrick J. Wong
parent
fb1755a645
commit
643c8c05e7
@ -2214,7 +2214,7 @@ xfs_ifree_cluster(
|
||||
xfs_buf_t *bp;
|
||||
xfs_inode_t *ip;
|
||||
xfs_inode_log_item_t *iip;
|
||||
xfs_log_item_t *lip;
|
||||
struct xfs_log_item *lip;
|
||||
struct xfs_perag *pag;
|
||||
xfs_ino_t inum;
|
||||
|
||||
@ -2272,8 +2272,7 @@ xfs_ifree_cluster(
|
||||
* stale first, we will not attempt to lock them in the loop
|
||||
* below as the XFS_ISTALE flag will be set.
|
||||
*/
|
||||
lip = bp->b_li_list;
|
||||
while (lip) {
|
||||
list_for_each_entry(lip, &bp->b_li_list, li_bio_list) {
|
||||
if (lip->li_type == XFS_LI_INODE) {
|
||||
iip = (xfs_inode_log_item_t *)lip;
|
||||
ASSERT(iip->ili_logged == 1);
|
||||
@ -2283,7 +2282,6 @@ xfs_ifree_cluster(
|
||||
&iip->ili_item.li_lsn);
|
||||
xfs_iflags_set(iip->ili_inode, XFS_ISTALE);
|
||||
}
|
||||
lip = lip->li_bio_list;
|
||||
}
|
||||
|
||||
|
||||
@ -3649,7 +3647,7 @@ xfs_iflush_int(
|
||||
/* generate the checksum. */
|
||||
xfs_dinode_calc_crc(mp, dip);
|
||||
|
||||
ASSERT(bp->b_li_list != NULL);
|
||||
ASSERT(!list_empty(&bp->b_li_list));
|
||||
ASSERT(bp->b_iodone != NULL);
|
||||
return 0;
|
||||
|
||||
|
Reference in New Issue
Block a user