[Btrfs-devel] [Btrfs][PATCH]Fix typo in extent_io.c

Yan Zheng yanzheng at 21cn.com
Mon Feb 4 04:29:37 PST 2008


---
diff -r 33176f6b452f extent_io.c
--- a/extent_io.c	Fri Feb 01 16:35:04 2008 -0500
+++ b/extent_io.c	Mon Feb 04 20:26:35 2008 +0800
@@ -1416,7 +1416,7 @@ static int end_bio_extent_writepage(stru
 		 * to the correct offsets in the file
 		 */
 		if (state && (state->end + 1 != start ||
-		    !state->state & EXTENT_WRITEBACK)) {
+		    !(state->state & EXTENT_WRITEBACK))) {
 			state = NULL;
 		}
 		spin_unlock_irqrestore(&tree->lock, flags);
@@ -1539,7 +1539,7 @@ static int end_bio_extent_readpage(struc
 		 * to the correct offsets in the file
 		 */
 		if (state && (state->end + 1 != start ||
-		    !state->state & EXTENT_WRITEBACK)) {
+		    !(state->state & EXTENT_LOCKED))) {
 			state = NULL;
 		}
 		spin_unlock_irqrestore(&tree->lock, flags);
diff -r 33176f6b452f inode.c
--- a/inode.c	Fri Feb 01 16:35:04 2008 -0500
+++ b/inode.c	Mon Feb 04 20:26:36 2008 +0800
@@ -365,7 +365,7 @@ int btrfs_readpage_end_io_hook(struct pa
 	    btrfs_test_flag(inode, NODATASUM))
 		return 0;

-	if (state->start == start) {
+	if (state && state->start == start) {
 		private = state->private;
 		ret = 0;
 	} else {



More information about the Btrfs-devel mailing list