From: Darrick J. Wong Date: Mon, 31 Jul 2017 20:08:11 +0000 (-0500) Subject: xfs: pass along transaction context when reading directory block buffers X-Git-Tag: v4.13.0-rc1~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=581ce8a5c4c45ffb97053d9bd64c5777925d4bb6;p=thirdparty%2Fxfsprogs-dev.git 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 --- 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__ */