Linux XFS filesystem development
 help / color / mirror / Atom feed
* [PATCH] xfs: split an assert in xfs_trans_log_buf
@ 2026-07-20  9:36 Christoph Hellwig
  2026-08-18  9:23 ` Carlos Maiolino
  2026-08-21  7:35 ` Carlos Maiolino
  0 siblings, 2 replies; 3+ messages in thread
From: Christoph Hellwig @ 2026-07-20  9:36 UTC (permalink / raw)
  To: cem; +Cc: linux-xfs

Split the "irst <= last && last < BBTOB(bp->b_length)" assert into two to
make it clear which condition fired.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/xfs/xfs_trans_buf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_trans_buf.c b/fs/xfs/xfs_trans_buf.c
index 1e025848811a..a5d25b703dfc 100644
--- a/fs/xfs/xfs_trans_buf.c
+++ b/fs/xfs/xfs_trans_buf.c
@@ -521,7 +521,8 @@ xfs_trans_log_buf(
 {
 	struct xfs_buf_log_item	*bip = bp->b_log_item;
 
-	ASSERT(first <= last && last < BBTOB(bp->b_length));
+	ASSERT(first <= last);
+	ASSERT(last < BBTOB(bp->b_length));
 	ASSERT(!(bip->bli_flags & XFS_BLI_ORDERED));
 
 	xfs_trans_dirty_buf(tp, bp);
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] xfs: split an assert in xfs_trans_log_buf
  2026-07-20  9:36 [PATCH] xfs: split an assert in xfs_trans_log_buf Christoph Hellwig
@ 2026-08-18  9:23 ` Carlos Maiolino
  2026-08-21  7:35 ` Carlos Maiolino
  1 sibling, 0 replies; 3+ messages in thread
From: Carlos Maiolino @ 2026-08-18  9:23 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-xfs

On Mon, Jul 20, 2026 at 11:36:12AM +0200, Christoph Hellwig wrote:
> Split the "irst <= last && last < BBTOB(bp->b_length)" assert into two to
> make it clear which condition fired.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  fs/xfs/xfs_trans_buf.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/xfs_trans_buf.c b/fs/xfs/xfs_trans_buf.c
> index 1e025848811a..a5d25b703dfc 100644
> --- a/fs/xfs/xfs_trans_buf.c
> +++ b/fs/xfs/xfs_trans_buf.c
> @@ -521,7 +521,8 @@ xfs_trans_log_buf(
>  {
>  	struct xfs_buf_log_item	*bip = bp->b_log_item;
>  
> -	ASSERT(first <= last && last < BBTOB(bp->b_length));
> +	ASSERT(first <= last);
> +	ASSERT(last < BBTOB(bp->b_length));
>  	ASSERT(!(bip->bli_flags & XFS_BLI_ORDERED));
>  
>  	xfs_trans_dirty_buf(tp, bp);

Ops, I think this fell through the cracks. Looks good though...

Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>


> -- 
> 2.53.0
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] xfs: split an assert in xfs_trans_log_buf
  2026-07-20  9:36 [PATCH] xfs: split an assert in xfs_trans_log_buf Christoph Hellwig
  2026-08-18  9:23 ` Carlos Maiolino
@ 2026-08-21  7:35 ` Carlos Maiolino
  1 sibling, 0 replies; 3+ messages in thread
From: Carlos Maiolino @ 2026-08-21  7:35 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-xfs

On Mon, 20 Jul 2026 11:36:12 +0200, Christoph Hellwig wrote:
> Split the "irst <= last && last < BBTOB(bp->b_length)" assert into two to
> make it clear which condition fired.
> 
> 

Applied to for-next, thanks!

[1/1] xfs: split an assert in xfs_trans_log_buf
      commit: b9b541e70d465a8c9cadf697eec7cb15b6653e7d

Best regards,
-- 
Carlos Maiolino <cem@kernel.org>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-08-21  7:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-20  9:36 [PATCH] xfs: split an assert in xfs_trans_log_buf Christoph Hellwig
2026-08-18  9:23 ` Carlos Maiolino
2026-08-21  7:35 ` Carlos Maiolino

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox