aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_dir2_leaf.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_dir2_leaf.c')
-rw-r--r--fs/xfs/xfs_dir2_leaf.c31
1 files changed, 24 insertions, 7 deletions
diff --git a/fs/xfs/xfs_dir2_leaf.c b/fs/xfs/xfs_dir2_leaf.c
index 8a95547d42ac..5b3bcab2a656 100644
--- a/fs/xfs/xfs_dir2_leaf.c
+++ b/fs/xfs/xfs_dir2_leaf.c
@@ -62,23 +62,40 @@ xfs_dir2_leaf_verify(
62 XFS_CORRUPTION_ERROR(__func__, XFS_ERRLEVEL_LOW, mp, hdr); 62 XFS_CORRUPTION_ERROR(__func__, XFS_ERRLEVEL_LOW, mp, hdr);
63 xfs_buf_ioerror(bp, EFSCORRUPTED); 63 xfs_buf_ioerror(bp, EFSCORRUPTED);
64 } 64 }
65}
66
67static void
68xfs_dir2_leaf1_write_verify(
69 struct xfs_buf *bp)
70{
71 xfs_dir2_leaf_verify(bp, cpu_to_be16(XFS_DIR2_LEAF1_MAGIC));
72}
65 73
74static void
75xfs_dir2_leaf1_read_verify(
76 struct xfs_buf *bp)
77{
78 xfs_dir2_leaf_verify(bp, cpu_to_be16(XFS_DIR2_LEAF1_MAGIC));
79 bp->b_pre_io = xfs_dir2_leaf1_write_verify;
66 bp->b_iodone = NULL; 80 bp->b_iodone = NULL;
67 xfs_buf_ioend(bp, 0); 81 xfs_buf_ioend(bp, 0);
68} 82}
69 83
70static void 84static void
71xfs_dir2_leaf1_verify( 85xfs_dir2_leafn_write_verify(
72 struct xfs_buf *bp) 86 struct xfs_buf *bp)
73{ 87{
74 xfs_dir2_leaf_verify(bp, cpu_to_be16(XFS_DIR2_LEAF1_MAGIC)); 88 xfs_dir2_leaf_verify(bp, cpu_to_be16(XFS_DIR2_LEAFN_MAGIC));
75} 89}
76 90
77void 91void
78xfs_dir2_leafn_verify( 92xfs_dir2_leafn_read_verify(
79 struct xfs_buf *bp) 93 struct xfs_buf *bp)
80{ 94{
81 xfs_dir2_leaf_verify(bp, cpu_to_be16(XFS_DIR2_LEAFN_MAGIC)); 95 xfs_dir2_leaf_verify(bp, cpu_to_be16(XFS_DIR2_LEAFN_MAGIC));
96 bp->b_pre_io = xfs_dir2_leafn_write_verify;
97 bp->b_iodone = NULL;
98 xfs_buf_ioend(bp, 0);
82} 99}
83 100
84static int 101static int
@@ -90,7 +107,7 @@ xfs_dir2_leaf_read(
90 struct xfs_buf **bpp) 107 struct xfs_buf **bpp)
91{ 108{
92 return xfs_da_read_buf(tp, dp, fbno, mappedbno, bpp, 109 return xfs_da_read_buf(tp, dp, fbno, mappedbno, bpp,
93 XFS_DATA_FORK, xfs_dir2_leaf1_verify); 110 XFS_DATA_FORK, xfs_dir2_leaf1_read_verify);
94} 111}
95 112
96int 113int
@@ -102,7 +119,7 @@ xfs_dir2_leafn_read(
102 struct xfs_buf **bpp) 119 struct xfs_buf **bpp)
103{ 120{
104 return xfs_da_read_buf(tp, dp, fbno, mappedbno, bpp, 121 return xfs_da_read_buf(tp, dp, fbno, mappedbno, bpp,
105 XFS_DATA_FORK, xfs_dir2_leafn_verify); 122 XFS_DATA_FORK, xfs_dir2_leafn_read_verify);
106} 123}
107 124
108/* 125/*