From 296dfd7fdba3a8b702d9cb47afc9061f52e18656 Mon Sep 17 00:00:00 2001 From: Jie Liu Date: Thu, 24 Jul 2014 18:40:26 +1000 Subject: [PATCH] xfs: remove redundant user buffer count checks at xfs_bulkstat From: Jie Liu Remove the redundant user buffer and count checks as it has already been validated at xfs_ioc_bulkstat(). Signed-off-by: Jie Liu Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner --- fs/xfs/xfs_itable.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/xfs/xfs_itable.c b/fs/xfs/xfs_itable.c index ed042fff9337..940eeebaca03 100644 --- a/fs/xfs/xfs_itable.c +++ b/fs/xfs/xfs_itable.c @@ -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;