]> git.karo-electronics.de Git - linux-beck.git/commitdiff
GFS2: Remove test which is always true
authorSteven Whitehouse <swhiteho@redhat.com>
Wed, 4 Dec 2013 11:14:05 +0000 (11:14 +0000)
committerSteven Whitehouse <swhiteho@redhat.com>
Fri, 3 Jan 2014 09:59:30 +0000 (09:59 +0000)
Since gfs2_inplace_reserve() is always called with a valid
alloc parms structure, there is no need to test for this
within the function itself - and in any case, after we've
all ready dereferenced it anyway.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/rgrp.c

index 797f1d3114ef22684fed08d076e9d329d01c8807..2584710f64596117c57f004b01e84cbf51fb7191 100644 (file)
@@ -1943,7 +1943,7 @@ int gfs2_inplace_reserve(struct gfs2_inode *ip, const struct gfs2_alloc_parms *a
                /* Skip unuseable resource groups */
                if ((rs->rs_rbm.rgd->rd_flags & (GFS2_RGF_NOALLOC |
                                                 GFS2_RDF_ERROR)) ||
-                   (ap && (ap->target > rs->rs_rbm.rgd->rd_extfail_pt)))
+                   (ap->target > rs->rs_rbm.rgd->rd_extfail_pt))
                        goto skip_rgrp;
 
                if (sdp->sd_args.ar_rgrplvb)