On 1/6/21 8:57 AM, Brian Foster wrote: > On Tue, Jan 05, 2021 at 04:02:18PM -0600, Eric Sandeen wrote: >> This pre-patch helps make the next libxfs-sync for 5.11 a bit >> more clear. >> >> In reality, the libxfs_inode_alloc function matches the kernel's >> xfs_dir_ialloc so rename it for clarity before the rest of the >> sync, and change several variable names for the same reason. >> >> Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx> >> --- >> > ... >> diff --git a/libxfs/util.c b/libxfs/util.c >> index 252cf91e..62eadaea 100644 >> --- a/libxfs/util.c >> +++ b/libxfs/util.c > ... >> @@ -559,25 +561,25 @@ libxfs_inode_alloc( >> >> if (ialloc_context) { >> >> - xfs_trans_bhold(*tp, ialloc_context); >> + xfs_trans_bhold(tp, ialloc_context); >> >> - error = xfs_trans_roll(tp); >> - if (error) { >> + code = xfs_trans_roll(tpp); > > The subsequent uses of tp no longer refer to the right transaction after > this roll. FWIW, there is a subtle difference with the kernel code where > this call passes &tp and then updates tpp on return, but we could also > just update tp here if that's still good enough to facilitate the libxfs > sync. Whoops, now I remember meaning to go back and check that, thanks, I'll take a closer look. -Eric