Re: [PATCH] xfs: fix compilation warnings in xfs_sync_sb_buf when CONFIG_XFS_RT=n
From: Zhou, Yun
Date: Wed Jul 22 2026 - 05:13:25 EST
On 7/22/26 16:49, Carlos Maiolino wrote:
On Wed, Jul 22, 2026 at 12:28:41PM +0800, Yun Zhou wrote:
When CONFIG_XFS_RT is disabled, xfs_log_rtsb() is a macro expanding to
(NULL), causing 'statement with no effect' and 'variable set but not
used' warnings.
Fix by removing the bp variable and passing xfs_trans_getsb(tp) directly
to xfs_log_rtsb(). This is safe because xfs_log_sb() already joins the
sb buffer to the transaction internally.
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Closes: https://lore.kernel.org/oe-kbuild-all/202607212237.Pzw1sr5k-lkp@xxxxxxxxx/
Fixes: b9ad0b9891dd ("xfs: don't hold buffer locks across sync transaction commit in xfs_sync_sb_buf")
Signed-off-by: Yun Zhou <yun.zhou@xxxxxxxxxxxxx>
We don't need a fix for a patch that is still in linux-next... Merge it
against your original patch and re-send it. I'll just replace the old
patch
Okay, I will resend v2 as requested. Sorry for the inconvenience.
BR,
Yun