Commit eada0a55 authored by Eric Sandeen's avatar Eric Sandeen Committed by Nathan Scott

[XFS] Remove test for impossible condition (unsigned 8-bit >= 256)

SGI Modid: 2.5.x-xfs:slinx:149574a
parent 36940529
...@@ -486,8 +486,7 @@ xfs_attr_shortform_list(xfs_attr_list_context_t *context) ...@@ -486,8 +486,7 @@ xfs_attr_shortform_list(xfs_attr_list_context_t *context)
i < INT_GET(sf->hdr.count, ARCH_CONVERT); i++) { i < INT_GET(sf->hdr.count, ARCH_CONVERT); i++) {
if (unlikely( if (unlikely(
((char *)sfe < (char *)sf) || ((char *)sfe < (char *)sf) ||
((char *)sfe >= ((char *)sf + dp->i_afp->if_bytes)) || ((char *)sfe >= ((char *)sf + dp->i_afp->if_bytes)))) {
(sfe->namelen >= MAXNAMELEN))) {
XFS_CORRUPTION_ERROR("xfs_attr_shortform_list", XFS_CORRUPTION_ERROR("xfs_attr_shortform_list",
XFS_ERRLEVEL_LOW, XFS_ERRLEVEL_LOW,
context->dp->i_mount, sfe); context->dp->i_mount, sfe);
......
...@@ -483,8 +483,7 @@ xfs_dir_shortform_getdents(xfs_inode_t *dp, uio_t *uio, int *eofp, ...@@ -483,8 +483,7 @@ xfs_dir_shortform_getdents(xfs_inode_t *dp, uio_t *uio, int *eofp,
if (unlikely( if (unlikely(
((char *)sfe < (char *)sf) || ((char *)sfe < (char *)sf) ||
((char *)sfe >= ((char *)sf + dp->i_df.if_bytes)) || ((char *)sfe >= ((char *)sf + dp->i_df.if_bytes)))) {
(sfe->namelen >= MAXNAMELEN))) {
xfs_dir_trace_g_du("sf: corrupted", dp, uio); xfs_dir_trace_g_du("sf: corrupted", dp, uio);
XFS_CORRUPTION_ERROR("xfs_dir_shortform_getdents", XFS_CORRUPTION_ERROR("xfs_dir_shortform_getdents",
XFS_ERRLEVEL_LOW, mp, sfe); XFS_ERRLEVEL_LOW, mp, sfe);
...@@ -2001,8 +2000,7 @@ xfs_dir_leaf_getdents_int( ...@@ -2001,8 +2000,7 @@ xfs_dir_leaf_getdents_int(
if (unlikely( if (unlikely(
((char *)namest < (char *)leaf) || ((char *)namest < (char *)leaf) ||
((char *)namest >= (char *)leaf + XFS_LBSIZE(mp)) || ((char *)namest >= (char *)leaf + XFS_LBSIZE(mp)))) {
(entry->namelen >= MAXNAMELEN))) {
XFS_CORRUPTION_ERROR("xfs_dir_leaf_getdents_int(1)", XFS_CORRUPTION_ERROR("xfs_dir_leaf_getdents_int(1)",
XFS_ERRLEVEL_LOW, mp, leaf); XFS_ERRLEVEL_LOW, mp, leaf);
xfs_dir_trace_g_du("leaf: corrupted", dp, uio); xfs_dir_trace_g_du("leaf: corrupted", dp, uio);
...@@ -2065,8 +2063,7 @@ xfs_dir_leaf_getdents_int( ...@@ -2065,8 +2063,7 @@ xfs_dir_leaf_getdents_int(
if (unlikely( if (unlikely(
((char *)namest < (char *)leaf) || ((char *)namest < (char *)leaf) ||
((char *)namest >= (char *)leaf + XFS_LBSIZE(mp)) || ((char *)namest >= (char *)leaf + XFS_LBSIZE(mp)))) {
(entry->namelen >= MAXNAMELEN))) {
XFS_CORRUPTION_ERROR("xfs_dir_leaf_getdents_int(2)", XFS_CORRUPTION_ERROR("xfs_dir_leaf_getdents_int(2)",
XFS_ERRLEVEL_LOW, mp, leaf); XFS_ERRLEVEL_LOW, mp, leaf);
xfs_dir_trace_g_du("leaf: corrupted", dp, uio); xfs_dir_trace_g_du("leaf: corrupted", dp, uio);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment