xfs: remove redundant user buffer count checks at xfs_bulkstat
authorJie Liu <jeff.liu@oracle.com>
Thu, 24 Jul 2014 08:40:26 +0000 (18:40 +1000)
committerDave Chinner <david@fromorbit.com>
Thu, 24 Jul 2014 08:40:26 +0000 (18:40 +1000)
From: Jie Liu <jeff.liu@oracle.com>

Remove the redundant user buffer and count checks as it has already
been validated at xfs_ioc_bulkstat().

Signed-off-by: Jie Liu <jeff.liu@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_itable.c

index ed042fff9337561fc2bcc6c0506c57ed451fcc68..940eeebaca03cf4df82c23c4abdf52a1f32e3d35 100644 (file)
@@ -230,9 +230,7 @@ xfs_bulkstat(
                *ubcountp = 0;
                return 0;
        }
-       if (!ubcountp || *ubcountp <= 0) {
-               return -EINVAL;
-       }
+
        ubcount = *ubcountp; /* statstruct's */
        ubleft = ubcount * statstruct_size; /* bytes */
        *ubcountp = ubelem = 0;