Re: [PATCH 9/9] xfs: get rid of the log item descriptor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>  	/* Chase down all the log items to see if the bp is there */
> -	list_for_each_entry(lidp, &cur->bc_tp->t_items, lid_trans) {
> -		struct xfs_buf_log_item	*bip;
> -		bip = (struct xfs_buf_log_item *)lidp->lid_item;
> +	list_for_each_entry(lip, &cur->bc_tp->t_items, li_trans) {
> +		struct xfs_buf_log_item	*bip = (struct xfs_buf_log_item *)lip;
> +
>  		if (bip->bli_item.li_type == XFS_LI_BUF &&

This isn't really new in this patch, but I think this code needs to
be fixed to respect typing.  That is:

  - do the li_type check on the original log item we iterate over
  - use containe_of to get at the buf_log_item
  - possible move this code into a helper function in xfs_buf_item.c,
    where it logically belongs and can use the BUF_ITEM() helper.

but that can be done in a separate fixup patch.

Otherwise looks fine:

Reviewed-by: Christoph Hellwig <hch@xxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux