btrfs: avoid comparing with NULL pointer
diff mbox

Message ID 4B5FDCD1.8060806@gmail.com
State Rejected
Headers show

Commit Message

liu weni Jan. 27, 2010, 6:27 a.m. UTC
None

Patch
diff mbox

diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 009e3bd..a300dca 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -1407,11 +1407,11 @@  static int bio_ready_for_csum(struct bio *bio)

bio_for_each_segment(bvec, bio, i) {
page = bvec->bv_page;
- if (page->private == EXTENT_PAGE_PRIVATE) {
+ if (!page->private) {
length += bvec->bv_len;
continue;
}
- if (!page->private) {
+ if (page->private == EXTENT_PAGE_PRIVATE) {
length += bvec->bv_len;
continue;
}