[PATCH v3 05/10] xfs: remove redundant user buffer count checks at xfs_bulkstat

Jeff Liu jeff.liu at oracle.com
Tue Jun 3 04:18:24 CDT 2014


From: Jie Liu <jeff.liu at 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 at oracle.com>
---
 fs/xfs/xfs_itable.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/fs/xfs/xfs_itable.c b/fs/xfs/xfs_itable.c
index 693e787..d210e24 100644
--- a/fs/xfs/xfs_itable.c
+++ b/fs/xfs/xfs_itable.c
@@ -230,9 +230,6 @@ xfs_bulkstat(
 		*ubcountp = 0;
 		return 0;
 	}
-	if (!ubcountp || *ubcountp <= 0) {
-		return EINVAL;
-	}
 	ubcount = *ubcountp; /* statstruct's */
 	ubleft = ubcount * statstruct_size; /* bytes */
 	*ubcountp = ubelem = 0;
-- 
1.8.3.2



More information about the xfs mailing list