summaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@sandeen.net>2016-04-06 07:57:45 +1000
committerDave Chinner <david@fromorbit.com>2016-04-06 07:57:45 +1000
commit7af5ad28a603f2d1ef4c579b8ab0a9d4767a348e (patch)
treebe9dfa93d1db3c4428a15cdd7a6aa5a18f7fc9b0 /fs/xfs
parente5bd12bfea60af455f4cbad494e4ac1082e3abd6 (diff)
downloadop-kernel-dev-7af5ad28a603f2d1ef4c579b8ab0a9d4767a348e.zip
op-kernel-dev-7af5ad28a603f2d1ef4c579b8ab0a9d4767a348e.tar.gz
xfs: remove put_value from attr ->put_listent context
The put_value context member is never set; remove it and the conditional test in xfs_attr3_leaf_list_int(). Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/xfs_attr.h1
-rw-r--r--fs/xfs/xfs_attr_list.c31
2 files changed, 3 insertions, 29 deletions
diff --git a/fs/xfs/xfs_attr.h b/fs/xfs/xfs_attr.h
index dab4f41..e3da5d4 100644
--- a/fs/xfs/xfs_attr.h
+++ b/fs/xfs/xfs_attr.h
@@ -127,7 +127,6 @@ typedef struct xfs_attr_list_context {
int firstu; /* first used byte in buffer */
int flags; /* from VOP call */
int resynch; /* T/F: resynch with cursor */
- int put_value; /* T/F: need value for listent */
put_listent_func_t put_listent; /* list output fmt function */
int index; /* index into output buffer */
} xfs_attr_list_context_t;
diff --git a/fs/xfs/xfs_attr_list.c b/fs/xfs/xfs_attr_list.c
index d30dbfa..cbf4f5d 100644
--- a/fs/xfs/xfs_attr_list.c
+++ b/fs/xfs/xfs_attr_list.c
@@ -429,45 +429,20 @@ xfs_attr3_leaf_list_int(
name_loc->nameval,
(int)name_loc->namelen,
be16_to_cpu(name_loc->valuelen));
- if (retval)
- return retval;
} else {
xfs_attr_leaf_name_remote_t *name_rmt =
xfs_attr3_leaf_name_remote(leaf, i);
int valuelen = be32_to_cpu(name_rmt->valuelen);
- if (context->put_value) {
- xfs_da_args_t args;
-
- memset((char *)&args, 0, sizeof(args));
- args.geo = context->dp->i_mount->m_attr_geo;
- args.dp = context->dp;
- args.whichfork = XFS_ATTR_FORK;
- args.valuelen = valuelen;
- args.rmtvaluelen = valuelen;
- args.value = kmem_alloc(valuelen, KM_SLEEP | KM_NOFS);
- args.rmtblkno = be32_to_cpu(name_rmt->valueblk);
- args.rmtblkcnt = xfs_attr3_rmt_blocks(
- args.dp->i_mount, valuelen);
- retval = xfs_attr_rmtval_get(&args);
- if (!retval)
- retval = context->put_listent(context,
- entry->flags,
- name_rmt->name,
- (int)name_rmt->namelen,
- valuelen);
- kmem_free(args.value);
- } else {
- retval = context->put_listent(context,
+ retval = context->put_listent(context,
entry->flags,
name_rmt->name,
(int)name_rmt->namelen,
valuelen);
- }
- if (retval)
- return retval;
}
+ if (retval)
+ break;
if (context->seen_enough)
break;
cursor->offset++;
OpenPOWER on IntegriCloud