diff options
Diffstat (limited to 'fs/xfs/xfs_attr_leaf.c')
-rw-r--r-- | fs/xfs/xfs_attr_leaf.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/fs/xfs/xfs_attr_leaf.c b/fs/xfs/xfs_attr_leaf.c index 3adfc5dcfe7d..531417b2c74c 100644 --- a/fs/xfs/xfs_attr_leaf.c +++ b/fs/xfs/xfs_attr_leaf.c | |||
@@ -2006,11 +2006,9 @@ xfs_attr_leaf_lookup_int(xfs_dabuf_t *bp, xfs_da_args_t *args) | |||
2006 | ((entry->flags & XFS_ATTR_ROOT) != 0)) | 2006 | ((entry->flags & XFS_ATTR_ROOT) != 0)) |
2007 | continue; | 2007 | continue; |
2008 | args->index = probe; | 2008 | args->index = probe; |
2009 | args->rmtblkno | 2009 | args->rmtblkno = be32_to_cpu(name_rmt->valueblk); |
2010 | = INT_GET(name_rmt->valueblk, ARCH_CONVERT); | ||
2011 | args->rmtblkcnt = XFS_B_TO_FSB(args->dp->i_mount, | 2010 | args->rmtblkcnt = XFS_B_TO_FSB(args->dp->i_mount, |
2012 | INT_GET(name_rmt->valuelen, | 2011 | be32_to_cpu(name_rmt->valuelen)); |
2013 | ARCH_CONVERT)); | ||
2014 | return(XFS_ERROR(EEXIST)); | 2012 | return(XFS_ERROR(EEXIST)); |
2015 | } | 2013 | } |
2016 | } | 2014 | } |
@@ -2057,8 +2055,8 @@ xfs_attr_leaf_getvalue(xfs_dabuf_t *bp, xfs_da_args_t *args) | |||
2057 | name_rmt = XFS_ATTR_LEAF_NAME_REMOTE(leaf, args->index); | 2055 | name_rmt = XFS_ATTR_LEAF_NAME_REMOTE(leaf, args->index); |
2058 | ASSERT(name_rmt->namelen == args->namelen); | 2056 | ASSERT(name_rmt->namelen == args->namelen); |
2059 | ASSERT(memcmp(args->name, name_rmt->name, args->namelen) == 0); | 2057 | ASSERT(memcmp(args->name, name_rmt->name, args->namelen) == 0); |
2060 | valuelen = INT_GET(name_rmt->valuelen, ARCH_CONVERT); | 2058 | valuelen = be32_to_cpu(name_rmt->valuelen); |
2061 | args->rmtblkno = INT_GET(name_rmt->valueblk, ARCH_CONVERT); | 2059 | args->rmtblkno = be32_to_cpu(name_rmt->valueblk); |
2062 | args->rmtblkcnt = XFS_B_TO_FSB(args->dp->i_mount, valuelen); | 2060 | args->rmtblkcnt = XFS_B_TO_FSB(args->dp->i_mount, valuelen); |
2063 | if (args->flags & ATTR_KERNOVAL) { | 2061 | if (args->flags & ATTR_KERNOVAL) { |
2064 | args->valuelen = valuelen; | 2062 | args->valuelen = valuelen; |
@@ -2413,8 +2411,7 @@ xfs_attr_leaf_list_int(xfs_dabuf_t *bp, xfs_attr_list_context_t *context) | |||
2413 | retval = xfs_attr_put_listent(context, namesp, | 2411 | retval = xfs_attr_put_listent(context, namesp, |
2414 | (char *)name_rmt->name, | 2412 | (char *)name_rmt->name, |
2415 | (int)name_rmt->namelen, | 2413 | (int)name_rmt->namelen, |
2416 | (int)INT_GET(name_rmt->valuelen, | 2414 | be32_to_cpu(name_rmt->valuelen)); |
2417 | ARCH_CONVERT)); | ||
2418 | } | 2415 | } |
2419 | } | 2416 | } |
2420 | if (retval == 0) { | 2417 | if (retval == 0) { |
@@ -2549,8 +2546,8 @@ xfs_attr_leaf_clearflag(xfs_da_args_t *args) | |||
2549 | if (args->rmtblkno) { | 2546 | if (args->rmtblkno) { |
2550 | ASSERT((entry->flags & XFS_ATTR_LOCAL) == 0); | 2547 | ASSERT((entry->flags & XFS_ATTR_LOCAL) == 0); |
2551 | name_rmt = XFS_ATTR_LEAF_NAME_REMOTE(leaf, args->index); | 2548 | name_rmt = XFS_ATTR_LEAF_NAME_REMOTE(leaf, args->index); |
2552 | INT_SET(name_rmt->valueblk, ARCH_CONVERT, args->rmtblkno); | 2549 | name_rmt->valueblk = cpu_to_be32(args->rmtblkno); |
2553 | INT_SET(name_rmt->valuelen, ARCH_CONVERT, args->valuelen); | 2550 | name_rmt->valuelen = cpu_to_be32(args->valuelen); |
2554 | xfs_da_log_buf(args->trans, bp, | 2551 | xfs_da_log_buf(args->trans, bp, |
2555 | XFS_DA_LOGRANGE(leaf, name_rmt, sizeof(*name_rmt))); | 2552 | XFS_DA_LOGRANGE(leaf, name_rmt, sizeof(*name_rmt))); |
2556 | } | 2553 | } |
@@ -2703,8 +2700,8 @@ xfs_attr_leaf_flipflags(xfs_da_args_t *args) | |||
2703 | if (args->rmtblkno) { | 2700 | if (args->rmtblkno) { |
2704 | ASSERT((entry1->flags & XFS_ATTR_LOCAL) == 0); | 2701 | ASSERT((entry1->flags & XFS_ATTR_LOCAL) == 0); |
2705 | name_rmt = XFS_ATTR_LEAF_NAME_REMOTE(leaf1, args->index); | 2702 | name_rmt = XFS_ATTR_LEAF_NAME_REMOTE(leaf1, args->index); |
2706 | INT_SET(name_rmt->valueblk, ARCH_CONVERT, args->rmtblkno); | 2703 | name_rmt->valueblk = cpu_to_be32(args->rmtblkno); |
2707 | INT_SET(name_rmt->valuelen, ARCH_CONVERT, args->valuelen); | 2704 | name_rmt->valuelen = cpu_to_be32(args->valuelen); |
2708 | xfs_da_log_buf(args->trans, bp1, | 2705 | xfs_da_log_buf(args->trans, bp1, |
2709 | XFS_DA_LOGRANGE(leaf1, name_rmt, sizeof(*name_rmt))); | 2706 | XFS_DA_LOGRANGE(leaf1, name_rmt, sizeof(*name_rmt))); |
2710 | } | 2707 | } |
@@ -2953,8 +2950,7 @@ xfs_attr_leaf_inactive(xfs_trans_t **trans, xfs_inode_t *dp, xfs_dabuf_t *bp) | |||
2953 | lp->valueblk = name_rmt->valueblk; | 2950 | lp->valueblk = name_rmt->valueblk; |
2954 | INT_SET(lp->valuelen, ARCH_CONVERT, | 2951 | INT_SET(lp->valuelen, ARCH_CONVERT, |
2955 | XFS_B_TO_FSB(dp->i_mount, | 2952 | XFS_B_TO_FSB(dp->i_mount, |
2956 | INT_GET(name_rmt->valuelen, | 2953 | be32_to_cpu(name_rmt->valuelen))); |
2957 | ARCH_CONVERT))); | ||
2958 | lp++; | 2954 | lp++; |
2959 | } | 2955 | } |
2960 | } | 2956 | } |