On 1/7/21 1:37 PM, Darrick J. Wong wrote: > On Thu, Jan 07, 2021 at 01:20:49PM -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> >> --- >> >> V2: Fix up local transaction pointer problems pointed out by Brian. >> >> Essentially, use tp locally, and reassign tpp on return. >> >> diff --git a/include/xfs_inode.h b/include/xfs_inode.h >> index 742aebc8..01a62daa 100644 >> --- a/include/xfs_inode.h >> +++ b/include/xfs_inode.h >> @@ -156,7 +156,7 @@ typedef struct cred { >> gid_t cr_gid; >> } cred_t; >> >> -extern int libxfs_inode_alloc (struct xfs_trans **, struct xfs_inode *, >> +extern int libxfs_dir_ialloc (struct xfs_trans **, struct xfs_inode *, >> mode_t, nlink_t, xfs_dev_t, struct cred *, >> struct fsxattr *, struct xfs_inode **); >> extern void libxfs_trans_inode_alloc_buf (struct xfs_trans *, >> diff --git a/libxfs/util.c b/libxfs/util.c >> index 252cf91e..376c5dac 100644 >> --- a/libxfs/util.c >> +++ b/libxfs/util.c >> @@ -531,9 +531,9 @@ error0: /* Cancel bmap, cancel trans */ >> * other in repair - now there is just the one. >> */ >> int >> -libxfs_inode_alloc( >> - xfs_trans_t **tp, >> - xfs_inode_t *pip, >> +libxfs_dir_ialloc( >> + xfs_trans_t **tpp, >> + xfs_inode_t *dp, >> mode_t mode, >> nlink_t nlink, >> xfs_dev_t rdev, >> @@ -541,16 +541,18 @@ libxfs_inode_alloc( >> struct fsxattr *fsx, >> xfs_inode_t **ipp) >> { >> - xfs_buf_t *ialloc_context; >> + xfs_trans_t *tp; >> xfs_inode_t *ip; >> - int error; >> + xfs_buf_t *ialloc_context = NULL; >> + int code; > > Maybe de-typedef this function too? Though I guess if the next patch is > a backport of "xfs: move on-disk inode allocation out of xfs_ialloc" to > libxfs/util.c then maybe that doesn't matter and I'll just shut up. :) As Mr. Reznor says, "everything goes away, in the end." > Reviewed-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> Thanks, -Eric