From 581ce8a5c4c45ffb97053d9bd64c5777925d4bb6 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Mon, 31 Jul 2017 15:08:11 -0500 Subject: [PATCH] xfs: pass along transaction context when reading directory block buffers Source kernel commit: acb9553cab552cf17154814f079f54401eefa474 Teach the directory reading functions to pass along a transaction context if one was supplied. The directory scrub code will use transactions to lock buffers and avoid deadlocking with itself in the case of loops. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Signed-off-by: Eric Sandeen --- libxfs/xfs_dir2_priv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libxfs/xfs_dir2_priv.h b/libxfs/xfs_dir2_priv.h index 6d2420974..4badd26c4 100644 --- a/libxfs/xfs_dir2_priv.h +++ b/libxfs/xfs_dir2_priv.h @@ -130,7 +130,7 @@ extern int xfs_dir2_sf_replace(struct xfs_da_args *args); extern int xfs_dir2_sf_verify(struct xfs_inode *ip); /* xfs_dir2_readdir.c */ -extern int xfs_readdir(struct xfs_inode *dp, struct dir_context *ctx, - size_t bufsize); +extern int xfs_readdir(struct xfs_trans *tp, struct xfs_inode *dp, + struct dir_context *ctx, size_t bufsize); #endif /* __XFS_DIR2_PRIV_H__ */ -- 2.47.2