diff options
author | Eric Sandeen <sandeen@sandeen.net> | 2016-04-05 17:57:45 -0400 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2016-04-05 17:57:45 -0400 |
commit | 7af5ad28a603f2d1ef4c579b8ab0a9d4767a348e (patch) | |
tree | be9dfa93d1db3c4428a15cdd7a6aa5a18f7fc9b0 | |
parent | e5bd12bfea60af455f4cbad494e4ac1082e3abd6 (diff) |
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>
-rw-r--r-- | fs/xfs/xfs_attr.h | 1 | ||||
-rw-r--r-- | fs/xfs/xfs_attr_list.c | 31 |
2 files changed, 3 insertions, 29 deletions
diff --git a/fs/xfs/xfs_attr.h b/fs/xfs/xfs_attr.h index dab4f41de278..e3da5d448bcf 100644 --- a/fs/xfs/xfs_attr.h +++ b/fs/xfs/xfs_attr.h | |||
@@ -127,7 +127,6 @@ typedef struct xfs_attr_list_context { | |||
127 | int firstu; /* first used byte in buffer */ | 127 | int firstu; /* first used byte in buffer */ |
128 | int flags; /* from VOP call */ | 128 | int flags; /* from VOP call */ |
129 | int resynch; /* T/F: resynch with cursor */ | 129 | int resynch; /* T/F: resynch with cursor */ |
130 | int put_value; /* T/F: need value for listent */ | ||
131 | put_listent_func_t put_listent; /* list output fmt function */ | 130 | put_listent_func_t put_listent; /* list output fmt function */ |
132 | int index; /* index into output buffer */ | 131 | int index; /* index into output buffer */ |
133 | } xfs_attr_list_context_t; | 132 | } xfs_attr_list_context_t; |
diff --git a/fs/xfs/xfs_attr_list.c b/fs/xfs/xfs_attr_list.c index d30dbfae05fe..cbf4f5d072f6 100644 --- a/fs/xfs/xfs_attr_list.c +++ b/fs/xfs/xfs_attr_list.c | |||
@@ -429,45 +429,20 @@ xfs_attr3_leaf_list_int( | |||
429 | name_loc->nameval, | 429 | name_loc->nameval, |
430 | (int)name_loc->namelen, | 430 | (int)name_loc->namelen, |
431 | be16_to_cpu(name_loc->valuelen)); | 431 | be16_to_cpu(name_loc->valuelen)); |
432 | if (retval) | ||
433 | return retval; | ||
434 | } else { | 432 | } else { |
435 | xfs_attr_leaf_name_remote_t *name_rmt = | 433 | xfs_attr_leaf_name_remote_t *name_rmt = |
436 | xfs_attr3_leaf_name_remote(leaf, i); | 434 | xfs_attr3_leaf_name_remote(leaf, i); |
437 | 435 | ||
438 | int valuelen = be32_to_cpu(name_rmt->valuelen); | 436 | int valuelen = be32_to_cpu(name_rmt->valuelen); |
439 | 437 | ||
440 | if (context->put_value) { | 438 | retval = context->put_listent(context, |
441 | xfs_da_args_t args; | ||
442 | |||
443 | memset((char *)&args, 0, sizeof(args)); | ||
444 | args.geo = context->dp->i_mount->m_attr_geo; | ||
445 | args.dp = context->dp; | ||
446 | args.whichfork = XFS_ATTR_FORK; | ||
447 | args.valuelen = valuelen; | ||
448 | args.rmtvaluelen = valuelen; | ||
449 | args.value = kmem_alloc(valuelen, KM_SLEEP | KM_NOFS); | ||
450 | args.rmtblkno = be32_to_cpu(name_rmt->valueblk); | ||
451 | args.rmtblkcnt = xfs_attr3_rmt_blocks( | ||
452 | args.dp->i_mount, valuelen); | ||
453 | retval = xfs_attr_rmtval_get(&args); | ||
454 | if (!retval) | ||
455 | retval = context->put_listent(context, | ||
456 | entry->flags, | ||
457 | name_rmt->name, | ||
458 | (int)name_rmt->namelen, | ||
459 | valuelen); | ||
460 | kmem_free(args.value); | ||
461 | } else { | ||
462 | retval = context->put_listent(context, | ||
463 | entry->flags, | 439 | entry->flags, |
464 | name_rmt->name, | 440 | name_rmt->name, |
465 | (int)name_rmt->namelen, | 441 | (int)name_rmt->namelen, |
466 | valuelen); | 442 | valuelen); |
467 | } | ||
468 | if (retval) | ||
469 | return retval; | ||
470 | } | 443 | } |
444 | if (retval) | ||
445 | break; | ||
471 | if (context->seen_enough) | 446 | if (context->seen_enough) |
472 | break; | 447 | break; |
473 | cursor->offset++; | 448 | cursor->offset++; |