aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/scrub/dir.c
diff options
context:
space:
mode:
authorAndrey Strachuk <strochuk@ispras.ru>2022-07-09 10:56:02 -0700
committerDarrick J. Wong <djwong@kernel.org>2022-07-09 10:56:02 -0700
commit0f38063d7a38015a47ca1488406bf21e0effe80e (patch)
tree58d883fe58d774b8815040e22c4a857b7f964329 /fs/xfs/scrub/dir.c
parentxfs: add selinux labels to whiteout inodes (diff)
downloadlinux-dev-0f38063d7a38015a47ca1488406bf21e0effe80e.tar.xz
linux-dev-0f38063d7a38015a47ca1488406bf21e0effe80e.zip
xfs: removed useless condition in function xfs_attr_node_get
At line 1561, variable "state" is being compared with NULL every loop iteration. ------------------------------------------------------------------- 1561 for (i = 0; state != NULL && i < state->path.active; i++) { 1562 xfs_trans_brelse(args->trans, state->path.blk[i].bp); 1563 state->path.blk[i].bp = NULL; 1564 } ------------------------------------------------------------------- However, it cannot be NULL. ---------------------------------------- 1546 state = xfs_da_state_alloc(args); ---------------------------------------- xfs_da_state_alloc calls kmem_cache_zalloc. kmem_cache_zalloc is called with __GFP_NOFAIL flag and, therefore, it cannot return NULL. -------------------------------------------------------------------------- struct xfs_da_state * xfs_da_state_alloc( struct xfs_da_args *args) { struct xfs_da_state *state; state = kmem_cache_zalloc(xfs_da_state_cache, GFP_NOFS | __GFP_NOFAIL); state->args = args; state->mp = args->dp->i_mount; return state; } -------------------------------------------------------------------------- Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Andrey Strachuk <strochuk@ispras.ru> Fixes: 4d0cdd2bb8f0 ("xfs: clean up xfs_attr_node_hasname") Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/scrub/dir.c')
0 files changed, 0 insertions, 0 deletions