diff options
author | Eric Sandeen <sandeen@sandeen.net> | 2016-04-05 17:57:32 -0400 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2016-04-05 17:57:32 -0400 |
commit | e5bd12bfea60af455f4cbad494e4ac1082e3abd6 (patch) | |
tree | 9bea32cb74dfa206870a07659a80c92c775ed4e7 | |
parent | 2a6fba6d2311151598abaa1e7c9abd5f8d024a43 (diff) |
xfs: don't pass value into attr ->put_listent
The value is not used; only names and value lengths are
returned. Remove the argument.
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 | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_attr_list.c | 18 | ||||
-rw-r--r-- | fs/xfs/xfs_xattr.c | 3 |
3 files changed, 8 insertions, 15 deletions
diff --git a/fs/xfs/xfs_attr.h b/fs/xfs/xfs_attr.h index 234331227c0c..dab4f41de278 100644 --- a/fs/xfs/xfs_attr.h +++ b/fs/xfs/xfs_attr.h | |||
@@ -114,7 +114,7 @@ typedef struct attrlist_cursor_kern { | |||
114 | 114 | ||
115 | /* Return 0 on success, or -errno; other state communicated via *context */ | 115 | /* Return 0 on success, or -errno; other state communicated via *context */ |
116 | typedef int (*put_listent_func_t)(struct xfs_attr_list_context *, int, | 116 | typedef int (*put_listent_func_t)(struct xfs_attr_list_context *, int, |
117 | unsigned char *, int, int, unsigned char *); | 117 | unsigned char *, int, int); |
118 | 118 | ||
119 | typedef struct xfs_attr_list_context { | 119 | typedef struct xfs_attr_list_context { |
120 | struct xfs_inode *dp; /* inode */ | 120 | struct xfs_inode *dp; /* inode */ |
diff --git a/fs/xfs/xfs_attr_list.c b/fs/xfs/xfs_attr_list.c index c8be331a3196..d30dbfae05fe 100644 --- a/fs/xfs/xfs_attr_list.c +++ b/fs/xfs/xfs_attr_list.c | |||
@@ -106,8 +106,7 @@ xfs_attr_shortform_list(xfs_attr_list_context_t *context) | |||
106 | sfe->flags, | 106 | sfe->flags, |
107 | sfe->nameval, | 107 | sfe->nameval, |
108 | (int)sfe->namelen, | 108 | (int)sfe->namelen, |
109 | (int)sfe->valuelen, | 109 | (int)sfe->valuelen); |
110 | &sfe->nameval[sfe->namelen]); | ||
111 | if (error) | 110 | if (error) |
112 | return error; | 111 | return error; |
113 | /* | 112 | /* |
@@ -198,8 +197,7 @@ xfs_attr_shortform_list(xfs_attr_list_context_t *context) | |||
198 | sbp->flags, | 197 | sbp->flags, |
199 | sbp->name, | 198 | sbp->name, |
200 | sbp->namelen, | 199 | sbp->namelen, |
201 | sbp->valuelen, | 200 | sbp->valuelen); |
202 | &sbp->name[sbp->namelen]); | ||
203 | if (error) { | 201 | if (error) { |
204 | kmem_free(sbuf); | 202 | kmem_free(sbuf); |
205 | return error; | 203 | return error; |
@@ -430,8 +428,7 @@ xfs_attr3_leaf_list_int( | |||
430 | entry->flags, | 428 | entry->flags, |
431 | name_loc->nameval, | 429 | name_loc->nameval, |
432 | (int)name_loc->namelen, | 430 | (int)name_loc->namelen, |
433 | be16_to_cpu(name_loc->valuelen), | 431 | be16_to_cpu(name_loc->valuelen)); |
434 | &name_loc->nameval[name_loc->namelen]); | ||
435 | if (retval) | 432 | if (retval) |
436 | return retval; | 433 | return retval; |
437 | } else { | 434 | } else { |
@@ -459,16 +456,14 @@ xfs_attr3_leaf_list_int( | |||
459 | entry->flags, | 456 | entry->flags, |
460 | name_rmt->name, | 457 | name_rmt->name, |
461 | (int)name_rmt->namelen, | 458 | (int)name_rmt->namelen, |
462 | valuelen, | 459 | valuelen); |
463 | args.value); | ||
464 | kmem_free(args.value); | 460 | kmem_free(args.value); |
465 | } else { | 461 | } else { |
466 | retval = context->put_listent(context, | 462 | retval = context->put_listent(context, |
467 | entry->flags, | 463 | entry->flags, |
468 | name_rmt->name, | 464 | name_rmt->name, |
469 | (int)name_rmt->namelen, | 465 | (int)name_rmt->namelen, |
470 | valuelen, | 466 | valuelen); |
471 | NULL); | ||
472 | } | 467 | } |
473 | if (retval) | 468 | if (retval) |
474 | return retval; | 469 | return retval; |
@@ -549,8 +544,7 @@ xfs_attr_put_listent( | |||
549 | int flags, | 544 | int flags, |
550 | unsigned char *name, | 545 | unsigned char *name, |
551 | int namelen, | 546 | int namelen, |
552 | int valuelen, | 547 | int valuelen) |
553 | unsigned char *value) | ||
554 | { | 548 | { |
555 | struct attrlist *alist = (struct attrlist *)context->alist; | 549 | struct attrlist *alist = (struct attrlist *)context->alist; |
556 | attrlist_ent_t *aep; | 550 | attrlist_ent_t *aep; |
diff --git a/fs/xfs/xfs_xattr.c b/fs/xfs/xfs_xattr.c index f2201299311f..7fdcf3327652 100644 --- a/fs/xfs/xfs_xattr.c +++ b/fs/xfs/xfs_xattr.c | |||
@@ -166,8 +166,7 @@ xfs_xattr_put_listent( | |||
166 | int flags, | 166 | int flags, |
167 | unsigned char *name, | 167 | unsigned char *name, |
168 | int namelen, | 168 | int namelen, |
169 | int valuelen, | 169 | int valuelen) |
170 | unsigned char *value) | ||
171 | { | 170 | { |
172 | char *prefix; | 171 | char *prefix; |
173 | int prefix_len; | 172 | int prefix_len; |