xfs: Pull up xfs_attr_rmtval_invalidate
This patch pulls xfs_attr_rmtval_invalidate out of xfs_attr_rmtval_remove and into the calling functions. Eventually __xfs_attr_rmtval_remove will replace xfs_attr_rmtval_remove when we introduce delayed attributes. These functions are exepcted to return -EAGAIN when they need a new transaction. Because the invalidate does not need a new transaction, we need to separate it from the rest of the function that does. This will enable __xfs_attr_rmtval_remove to smoothly replace xfs_attr_rmtval_remove later. Signed-off-by: Allison Collins <allison.henderson@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Acked-by: Dave Chinner <dchinner@redhat.com>
This commit is contained in:
parent
8b8e0cc020
commit
d4034c4662
|
@ -670,6 +670,10 @@ xfs_attr_leaf_addname(
|
||||||
args->rmtblkcnt = args->rmtblkcnt2;
|
args->rmtblkcnt = args->rmtblkcnt2;
|
||||||
args->rmtvaluelen = args->rmtvaluelen2;
|
args->rmtvaluelen = args->rmtvaluelen2;
|
||||||
if (args->rmtblkno) {
|
if (args->rmtblkno) {
|
||||||
|
error = xfs_attr_rmtval_invalidate(args);
|
||||||
|
if (error)
|
||||||
|
return error;
|
||||||
|
|
||||||
error = xfs_attr_rmtval_remove(args);
|
error = xfs_attr_rmtval_remove(args);
|
||||||
if (error)
|
if (error)
|
||||||
return error;
|
return error;
|
||||||
|
@ -1023,6 +1027,10 @@ restart:
|
||||||
args->rmtblkcnt = args->rmtblkcnt2;
|
args->rmtblkcnt = args->rmtblkcnt2;
|
||||||
args->rmtvaluelen = args->rmtvaluelen2;
|
args->rmtvaluelen = args->rmtvaluelen2;
|
||||||
if (args->rmtblkno) {
|
if (args->rmtblkno) {
|
||||||
|
error = xfs_attr_rmtval_invalidate(args);
|
||||||
|
if (error)
|
||||||
|
return error;
|
||||||
|
|
||||||
error = xfs_attr_rmtval_remove(args);
|
error = xfs_attr_rmtval_remove(args);
|
||||||
if (error)
|
if (error)
|
||||||
return error;
|
return error;
|
||||||
|
@ -1147,6 +1155,10 @@ xfs_attr_node_removename(
|
||||||
if (error)
|
if (error)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
error = xfs_attr_rmtval_invalidate(args);
|
||||||
|
if (error)
|
||||||
|
return error;
|
||||||
|
|
||||||
error = xfs_attr_rmtval_remove(args);
|
error = xfs_attr_rmtval_remove(args);
|
||||||
if (error)
|
if (error)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
|
@ -683,9 +683,6 @@ xfs_attr_rmtval_remove(
|
||||||
|
|
||||||
trace_xfs_attr_rmtval_remove(args);
|
trace_xfs_attr_rmtval_remove(args);
|
||||||
|
|
||||||
error = xfs_attr_rmtval_invalidate(args);
|
|
||||||
if (error)
|
|
||||||
return error;
|
|
||||||
/*
|
/*
|
||||||
* Keep de-allocating extents until the remote-value region is gone.
|
* Keep de-allocating extents until the remote-value region is gone.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue