Skip to contentSkip to conversation

xfs: extra semi-colon breaks a condition

PATCH In review Dan Carpenter 5 participants 5 messages Mar 28, 2014 – Apr 3, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfs: extra semi-colon breaks a condition

There were some extra semi-colons here which mean that we return true unintentionally.

Fixes a49935f200e2 ('xfs: xfs_check_page_type buffer checks need help')
fs/xfs/xfs_aops.c +2 -2
index 98016b3..75df77d 100644
@@ -659,10 +659,10 @@ xfs_check_page_type(
 			if (type = XFS_IO_UNWRITTEN)
 				return true;
 		} else if (buffer_delay(bh)) {
-			if (type = XFS_IO_DELALLOC);
+			if (type = XFS_IO_DELALLOC)
 				return true;
 		} else if (buffer_dirty(bh) && buffer_mapped(bh)) {
-			if (type = XFS_IO_OVERWRITE);
+			if (type = XFS_IO_OVERWRITE)
 				return true;
 		}
 
Reviewed-by on v1 1/1
#1 lore raw
Quoted 13 lines · Dan Carpenter

There were some extra semi-colons here which mean that we return true unintentionally.

Fixes a49935f200e2 ('xfs: xfs_check_page_type buffer checks need help')
fs/xfs/xfs_aops.c +0 -0
index 98016b3..75df77d 100644
@@ -659,10 +659,10 @@ xfs_check_page_type(
 			if (type = XFS_IO_UNWRITTEN)
 				return true;

fs/xfs/xfs_aops.c xfs_check_page_type( · line 668

Quoted 10 lines
fs/xfs/xfs_aops.c +2 -2
 		} else if (buffer_delay(bh)) {
-			if (type = XFS_IO_DELALLOC);
+			if (type = XFS_IO_DELALLOC)
 				return true;
 		} else if (buffer_dirty(bh) && buffer_mapped(bh)) {
-			if (type = XFS_IO_OVERWRITE);
+			if (type = XFS_IO_OVERWRITE)
 				return true;
 		}
 

Nice catch.

Quoted 5 lines

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Reviewed-by on v1 1/1
#2 lore raw
In reply to Dan Carpenter
Quoted 4 lines · Dan Carpenter

There were some extra semi-colons here which mean that we return true unintentionally.

Fixes a49935f200e2 ('xfs: xfs_check_page_type buffer checks need help')

that's terrifying.

Quoted 25 lines
fs/xfs/xfs_aops.c +2 -2
index 98016b3..75df77d 100644
@@ -659,10 +659,10 @@ xfs_check_page_type(
 			if (type = XFS_IO_UNWRITTEN)
 				return true;
 		} else if (buffer_delay(bh)) {
-			if (type = XFS_IO_DELALLOC);
+			if (type = XFS_IO_DELALLOC)
 				return true;
 		} else if (buffer_dirty(bh) && buffer_mapped(bh)) {
-			if (type = XFS_IO_OVERWRITE);
+			if (type = XFS_IO_OVERWRITE)
 				return true;
 		}
 

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#3 lore raw
Quoted 8 lines · Eric Sandeen
Quoted 4 lines · Dan Carpenter

There were some extra semi-colons here which mean that we return true unintentionally.

Fixes a49935f200e2 ('xfs: xfs_check_page_type buffer checks need help')

that's terrifying.

Wonder how errors like this one get into the kernel :-) Suppose it's not the main tree, but instead xfs private one.

Quoted 36 lines
Quoted 20 lines
fs/xfs/xfs_aops.c +2 -2
index 98016b3..75df77d 100644
@@ -659,10 +659,10 @@ xfs_check_page_type(
                      if (type == XFS_IO_UNWRITTEN)
                              return true;
              } else if (buffer_delay(bh)) {
-                     if (type == XFS_IO_DELALLOC);
+                     if (type == XFS_IO_DELALLOC)
                              return true;
              } else if (buffer_dirty(bh) && buffer_mapped(bh)) {
-                     if (type == XFS_IO_OVERWRITE);
+                     if (type == XFS_IO_OVERWRITE)
                              return true;
              }
 
Quoted 5 lines

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 1 line
Raphael S. Carvalho

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Reviewed-by on v1 1/1
#4 lore raw
In reply to Dan Carpenter
Quoted 5 lines · Dan Carpenter

There were some extra semi-colons here which mean that we return true unintentionally.

Fixes a49935f200e2 ('xfs: xfs_check_page_type buffer checks need help')

Dan, $BEVVIE_OF_CHOICE is on me next time we are in the same place. And bring a handful brown paper bags as well because there's a few people here that need to wear them for a while. :/

Signature · 2 lines
Dave Chinner
[email protected]