aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_attr.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2012-11-12 06:54:10 -0500
committerBen Myers <bpm@sgi.com>2012-11-15 22:34:36 -0500
commit4bb20a83a2a5ac4dcb62780c9950e47939956126 (patch)
tree2eef49464d5d58a54ab0bd0299e5054e8b657ce6 /fs/xfs/xfs_attr.c
parentc6319198702350a2215a8c0cacd6cc4283728a1b (diff)
xfs: add verifier callback to directory read code
Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Phil White <pwhite@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_attr.c')
-rw-r--r--fs/xfs/xfs_attr.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/fs/xfs/xfs_attr.c b/fs/xfs/xfs_attr.c
index 474c57a43cce..cd5a9cd0ded0 100644
--- a/fs/xfs/xfs_attr.c
+++ b/fs/xfs/xfs_attr.c
@@ -904,7 +904,7 @@ xfs_attr_leaf_addname(xfs_da_args_t *args)
904 dp = args->dp; 904 dp = args->dp;
905 args->blkno = 0; 905 args->blkno = 0;
906 error = xfs_da_read_buf(args->trans, args->dp, args->blkno, -1, &bp, 906 error = xfs_da_read_buf(args->trans, args->dp, args->blkno, -1, &bp,
907 XFS_ATTR_FORK); 907 XFS_ATTR_FORK, NULL);
908 if (error) 908 if (error)
909 return(error); 909 return(error);
910 ASSERT(bp != NULL); 910 ASSERT(bp != NULL);
@@ -1032,7 +1032,7 @@ xfs_attr_leaf_addname(xfs_da_args_t *args)
1032 * remove the "old" attr from that block (neat, huh!) 1032 * remove the "old" attr from that block (neat, huh!)
1033 */ 1033 */
1034 error = xfs_da_read_buf(args->trans, args->dp, args->blkno, -1, 1034 error = xfs_da_read_buf(args->trans, args->dp, args->blkno, -1,
1035 &bp, XFS_ATTR_FORK); 1035 &bp, XFS_ATTR_FORK, NULL);
1036 if (error) 1036 if (error)
1037 return(error); 1037 return(error);
1038 ASSERT(bp != NULL); 1038 ASSERT(bp != NULL);
@@ -1101,7 +1101,7 @@ xfs_attr_leaf_removename(xfs_da_args_t *args)
1101 dp = args->dp; 1101 dp = args->dp;
1102 args->blkno = 0; 1102 args->blkno = 0;
1103 error = xfs_da_read_buf(args->trans, args->dp, args->blkno, -1, &bp, 1103 error = xfs_da_read_buf(args->trans, args->dp, args->blkno, -1, &bp,
1104 XFS_ATTR_FORK); 1104 XFS_ATTR_FORK, NULL);
1105 if (error) { 1105 if (error) {
1106 return(error); 1106 return(error);
1107 } 1107 }
@@ -1159,7 +1159,7 @@ xfs_attr_leaf_get(xfs_da_args_t *args)
1159 1159
1160 args->blkno = 0; 1160 args->blkno = 0;
1161 error = xfs_da_read_buf(args->trans, args->dp, args->blkno, -1, &bp, 1161 error = xfs_da_read_buf(args->trans, args->dp, args->blkno, -1, &bp,
1162 XFS_ATTR_FORK); 1162 XFS_ATTR_FORK, NULL);
1163 if (error) 1163 if (error)
1164 return(error); 1164 return(error);
1165 ASSERT(bp != NULL); 1165 ASSERT(bp != NULL);
@@ -1190,7 +1190,8 @@ xfs_attr_leaf_list(xfs_attr_list_context_t *context)
1190 trace_xfs_attr_leaf_list(context); 1190 trace_xfs_attr_leaf_list(context);
1191 1191
1192 context->cursor->blkno = 0; 1192 context->cursor->blkno = 0;
1193 error = xfs_da_read_buf(NULL, context->dp, 0, -1, &bp, XFS_ATTR_FORK); 1193 error = xfs_da_read_buf(NULL, context->dp, 0, -1, &bp, XFS_ATTR_FORK,
1194 NULL);
1194 if (error) 1195 if (error)
1195 return XFS_ERROR(error); 1196 return XFS_ERROR(error);
1196 ASSERT(bp != NULL); 1197 ASSERT(bp != NULL);
@@ -1605,7 +1606,7 @@ xfs_attr_node_removename(xfs_da_args_t *args)
1605 state->path.blk[0].bp = NULL; 1606 state->path.blk[0].bp = NULL;
1606 1607
1607 error = xfs_da_read_buf(args->trans, args->dp, 0, -1, &bp, 1608 error = xfs_da_read_buf(args->trans, args->dp, 0, -1, &bp,
1608 XFS_ATTR_FORK); 1609 XFS_ATTR_FORK, NULL);
1609 if (error) 1610 if (error)
1610 goto out; 1611 goto out;
1611 ASSERT((((xfs_attr_leafblock_t *)bp->b_addr)->hdr.info.magic) == 1612 ASSERT((((xfs_attr_leafblock_t *)bp->b_addr)->hdr.info.magic) ==
@@ -1718,7 +1719,7 @@ xfs_attr_refillstate(xfs_da_state_t *state)
1718 error = xfs_da_read_buf(state->args->trans, 1719 error = xfs_da_read_buf(state->args->trans,
1719 state->args->dp, 1720 state->args->dp,
1720 blk->blkno, blk->disk_blkno, 1721 blk->blkno, blk->disk_blkno,
1721 &blk->bp, XFS_ATTR_FORK); 1722 &blk->bp, XFS_ATTR_FORK, NULL);
1722 if (error) 1723 if (error)
1723 return(error); 1724 return(error);
1724 } else { 1725 } else {
@@ -1737,7 +1738,7 @@ xfs_attr_refillstate(xfs_da_state_t *state)
1737 error = xfs_da_read_buf(state->args->trans, 1738 error = xfs_da_read_buf(state->args->trans,
1738 state->args->dp, 1739 state->args->dp,
1739 blk->blkno, blk->disk_blkno, 1740 blk->blkno, blk->disk_blkno,
1740 &blk->bp, XFS_ATTR_FORK); 1741 &blk->bp, XFS_ATTR_FORK, NULL);
1741 if (error) 1742 if (error)
1742 return(error); 1743 return(error);
1743 } else { 1744 } else {
@@ -1827,7 +1828,7 @@ xfs_attr_node_list(xfs_attr_list_context_t *context)
1827 bp = NULL; 1828 bp = NULL;
1828 if (cursor->blkno > 0) { 1829 if (cursor->blkno > 0) {
1829 error = xfs_da_read_buf(NULL, context->dp, cursor->blkno, -1, 1830 error = xfs_da_read_buf(NULL, context->dp, cursor->blkno, -1,
1830 &bp, XFS_ATTR_FORK); 1831 &bp, XFS_ATTR_FORK, NULL);
1831 if ((error != 0) && (error != EFSCORRUPTED)) 1832 if ((error != 0) && (error != EFSCORRUPTED))
1832 return(error); 1833 return(error);
1833 if (bp) { 1834 if (bp) {
@@ -1870,7 +1871,7 @@ xfs_attr_node_list(xfs_attr_list_context_t *context)
1870 for (;;) { 1871 for (;;) {
1871 error = xfs_da_read_buf(NULL, context->dp, 1872 error = xfs_da_read_buf(NULL, context->dp,
1872 cursor->blkno, -1, &bp, 1873 cursor->blkno, -1, &bp,
1873 XFS_ATTR_FORK); 1874 XFS_ATTR_FORK, NULL);
1874 if (error) 1875 if (error)
1875 return(error); 1876 return(error);
1876 if (unlikely(bp == NULL)) { 1877 if (unlikely(bp == NULL)) {
@@ -1937,7 +1938,7 @@ xfs_attr_node_list(xfs_attr_list_context_t *context)
1937 cursor->blkno = be32_to_cpu(leaf->hdr.info.forw); 1938 cursor->blkno = be32_to_cpu(leaf->hdr.info.forw);
1938 xfs_trans_brelse(NULL, bp); 1939 xfs_trans_brelse(NULL, bp);
1939 error = xfs_da_read_buf(NULL, context->dp, cursor->blkno, -1, 1940 error = xfs_da_read_buf(NULL, context->dp, cursor->blkno, -1,
1940 &bp, XFS_ATTR_FORK); 1941 &bp, XFS_ATTR_FORK, NULL);
1941 if (error) 1942 if (error)
1942 return(error); 1943 return(error);
1943 if (unlikely((bp == NULL))) { 1944 if (unlikely((bp == NULL))) {