xfs: fix remote attribute invalidation for a leaf
authorDave Chinner <[email protected]>
Mon, 3 Jun 2013 05:28:49 +0000 (15:28 +1000)
committerBen Myers <[email protected]>
Tue, 4 Jun 2013 22:36:30 +0000 (17:36 -0500)
When invalidating an attribute leaf block block, there might be
remote attributes that it points to. With the recent rework of the
remote attribute format, we have to make sure we calculate the
length of the attribute correctly. We aren't doing that in
xfs_attr3_leaf_inactive(), so fix it.

Signed-off-by: Dave Chinner <[email protected]>
Reviewed-by: Brian Foster <[email protected]>
Reviewed-by: Mark Tinguely <[email protected]>
Signed-off-by: Ben Myers <[email protected]>
fs/xfs/xfs_attr_leaf.c

index d788302e506a2ee46af9838d6f5751e26bb12e82..31d3cd12926918978f922edb6e0f01c22d29d864 100644 (file)
@@ -3258,7 +3258,7 @@ xfs_attr3_leaf_inactive(
                        name_rmt = xfs_attr3_leaf_name_remote(leaf, i);
                        if (name_rmt->valueblk) {
                                lp->valueblk = be32_to_cpu(name_rmt->valueblk);
-                               lp->valuelen = XFS_B_TO_FSB(dp->i_mount,
+                               lp->valuelen = xfs_attr3_rmt_blocks(dp->i_mount,
                                                    be32_to_cpu(name_rmt->valuelen));
                                lp++;
                        }