Re: [PATCH 3/4] xfs: reset buffer pointers before freeing them

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

 



>  		ealign = round_down(end_block, sectbb);
>  		if (j == 0 && (start_block + endcount > ealign)) {
> -			offset = XFS_BUF_PTR(bp);
> -			balign = BBTOB(ealign - start_block);
> -			error = XFS_BUF_SET_PTR(bp, offset + balign,
> -						BBTOB(sectbb));
> +			balign = ealign - start_block;
> +			offset = XFS_BUF_PTR(bp) + BBTOB(balign);
> +			error = xlog_bread_offset(log, ealign, sectbb,
> +							bp, offset);

I'd remove the use of balign entirely here.  The first use of this
variable earlier in the functions is for something entirely different,
so it's rather confusing.  (I only looked into that because I remember
some align variable beeing used later on, but that was elsewhere)

Otherwise looks good,

Reviewed-by: Christoph Hellwig <hch@xxxxxx>

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux