]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: pass along transaction context when reading directory block buffers
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 31 Jul 2017 20:08:11 +0000 (15:08 -0500)
committerEric Sandeen <sandeen@redhat.com>
Mon, 31 Jul 2017 20:08:11 +0000 (15:08 -0500)
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 <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_dir2_priv.h

index 6d2420974d4f9603e5a3ec5bfd88f2c964388245..4badd26c47e6455c200d7088ff296f261386d3ff 100644 (file)
@@ -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__ */