提交 d3a3340b 编写于 作者: A Allison Henderson 提交者: Darrick J. Wong

xfs: Initialize error in xfs_attr_remove_iter

A recent bug report generated a warning that a code path in
xfs_attr_remove_iter could potentially return error uninitialized in the
case of XFS_DAS_RM_SHRINK state.  Fix this by initializing error.
Signed-off-by: NAllison Henderson <allison.henderson@oracle.com>
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: NBrian Foster <bfoster@redhat.com>
Reviewed-by: NBill O'Donnell <bodonnel@redhat.com>
Reviewed-by: NDarrick J. Wong <djwong@kernel.org>
Signed-off-by: NDarrick J. Wong <djwong@kernel.org>
上级 a8f3522c
...@@ -1375,7 +1375,7 @@ xfs_attr_remove_iter( ...@@ -1375,7 +1375,7 @@ xfs_attr_remove_iter(
{ {
struct xfs_da_args *args = dac->da_args; struct xfs_da_args *args = dac->da_args;
struct xfs_da_state *state = dac->da_state; struct xfs_da_state *state = dac->da_state;
int retval, error; int retval, error = 0;
struct xfs_inode *dp = args->dp; struct xfs_inode *dp = args->dp;
trace_xfs_attr_node_removename(args); trace_xfs_attr_node_removename(args);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册