提交 c2e639f0 编写于 作者: Y Yan 提交者: Chris Mason

Btrfs: Fix typo in extent_io.c

---
Signed-off-by: NChris Mason <chris.mason@oracle.com>
上级 80b6794d
......@@ -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);
......
......@@ -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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册