diff options
Diffstat (limited to 'fs/xfs/xfs_dir2_leaf.c')
-rw-r--r-- | fs/xfs/xfs_dir2_leaf.c | 31 |
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 | |||
67 | static void | ||
68 | xfs_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 | ||
74 | static void | ||
75 | xfs_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 | ||
70 | static void | 84 | static void |
71 | xfs_dir2_leaf1_verify( | 85 | xfs_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 | ||
77 | void | 91 | void |
78 | xfs_dir2_leafn_verify( | 92 | xfs_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 | ||
84 | static int | 101 | static 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 | ||
96 | int | 113 | int |
@@ -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 | /* |