xfs: remove ATTR_ALLOC and XFS_DA_OP_ALLOCVAL
Use a NULL args->value as the indicator to lazily allocate a buffer instead, and let the caller always free args->value instead of duplicating the cleanup. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Chandan Rajendra <chandanrlinux@gmail.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
This commit is contained in:

committed by
Darrick J. Wong

parent
e513e25c38
commit
d49db18b24
@@ -477,7 +477,7 @@ xfs_attr_copy_value(
|
||||
return -ERANGE;
|
||||
}
|
||||
|
||||
if (args->op_flags & XFS_DA_OP_ALLOCVAL) {
|
||||
if (!args->value) {
|
||||
args->value = kmem_alloc_large(valuelen, 0);
|
||||
if (!args->value)
|
||||
return -ENOMEM;
|
||||
|
Reference in New Issue
Block a user