Skip to content

Commit

Permalink
xfs:xfs_dir2_node.c: pointer use before check for null
Browse files Browse the repository at this point in the history
ASSERT on args takes place after args dereference.
This assertion is redundant since we are going to panic anyway.

Found by Linux Driver Verification project (linuxtesting.org) -
PVS-Studio analyzer.

Signed-off-by: Denis Efremov <yefremov.denis@gmail.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
  • Loading branch information
Denis Efremov authored and Ben Myers committed Oct 30, 2013
1 parent ad22c7a commit 5bf1f43
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion fs/xfs/xfs_dir2_node.c
Original file line number Diff line number Diff line change
Expand Up @@ -1327,7 +1327,6 @@ xfs_dir2_leafn_split(
args = state->args;
dp = args->dp;
mp = dp->i_mount;
ASSERT(args != NULL);
ASSERT(oldblk->magic == XFS_DIR2_LEAFN_MAGIC);
error = xfs_da_grow_inode(args, &blkno);
if (error) {
Expand Down

0 comments on commit 5bf1f43

Please sign in to comment.