summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorYan <yanzheng@21cn.com>2008-02-04 13:57:25 (GMT)
committerChris Mason <chris.mason@oracle.com>2008-09-25 15:04:00 (GMT)
commitc2e639f02cff721172569add21ba5d058fd1a81c (patch)
treefeae72258a01f5360b0279c03b3dd1185cd662ac /fs
parent80b6794d1153ed91a040d873396efb9bd60969fd (diff)
downloadlinux-fsl-qoriq-c2e639f02cff721172569add21ba5d058fd1a81c.tar.xz
Btrfs: Fix typo in extent_io.c
--- Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/extent_io.c4
-rw-r--r--fs/btrfs/inode.c3
2 files changed, 3 insertions, 4 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 5d2fb52..36a943e 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -1416,7 +1416,7 @@ static int end_bio_extent_writepage(struct bio *bio,
* 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(struct bio *bio,
* 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 --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index f13b1db..44fc94f 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -364,8 +364,7 @@ int btrfs_readpage_end_io_hook(struct page *page, u64 start, u64 end,
if (btrfs_test_opt(root, NODATASUM) ||
btrfs_test_flag(inode, NODATASUM))
return 0;
-
- if (state->start == start) {
+ if (state && state->start == start) {
private = state->private;
ret = 0;
} else {