xfs:xfs_dir2_node.c: pointer use before check for null
authorDenis Efremov <yefremov.denis@gmail.com>
Fri, 25 Oct 2013 11:53:25 +0000 (15:53 +0400)
committerBen Myers <bpm@sgi.com>
Wed, 30 Oct 2013 20:53:14 +0000 (15:53 -0500)
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>
fs/xfs/xfs_dir2_node.c

index f90bf06..56369d4 100644 (file)
@@ -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) {