Skip to content

Commit

Permalink
xfs: remove redundant user buffer count checks at xfs_bulkstat
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jie Liu authored and Dave Chinner committed Jul 24, 2014
1 parent c7cb51d commit 296dfd7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions fs/xfs/xfs_itable.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 296dfd7

Please sign in to comment.