diff for duplicates of <4B604B86.9040307@gmail.com> diff --git a/a/1.txt b/N1/1.txt index 54156bb..3da99e3 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,7 +1,6 @@ -=E4=BA=8E 2010=E5=B9=B401=E6=9C=8827=E6=97=A5 16:00, Yan, Zheng =E5=86=99= -=E9=81=93: +于 2010年01月27日 16:00, Yan, Zheng 写道: > 2010/1/27 Liuwenyi<qingshenlwy@gmail.com>: -> =20 +> >> In this patch, I adjust the seqence of if-conditions. >> It will assess the page->private situation. >> First, we make sure the page->private is not null. @@ -24,32 +23,30 @@ >> 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 *bi= -o) +>> @@ -1407,11 +1407,11 @@ static int bio_ready_for_csum(struct bio *bio) >> >> bio_for_each_segment(bvec, bio, i) { ->> page =3D bvec->bv_page; ->> - if (page->private =3D=3D EXTENT_PAGE_PRIVATE) { +>> page = bvec->bv_page; +>> - if (page->private == EXTENT_PAGE_PRIVATE) { >> + if (!page->private) { ->> length +=3D bvec->bv_len; +>> length += bvec->bv_len; >> continue; >> } >> - if (!page->private) { ->> + if (page->private =3D=3D EXTENT_PAGE_PRIVATE) { ->> length +=3D bvec->bv_len; +>> + if (page->private == EXTENT_PAGE_PRIVATE) { +>> length += bvec->bv_len; >> continue; >> } >> -- ->> =20 +>> > Why do you want to do this? The code is perfect safe even > page->private is NULL. Furthermore, your patch is malformed. > > Yan, Zheng -> =20 +> Yes, I agree with you, this code is safe. But I think we should check whether the pointer is available first. -It is unnecessary judge the "(page->private =3D=3D EXTENT_PAGE_PRIVATE)= -" +It is unnecessary judge the "(page->private == EXTENT_PAGE_PRIVATE)" while page->private is null. diff --git a/a/content_digest b/N1/content_digest index 4b98806..0587edd 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -13,10 +13,9 @@ " strongzgy@gmail.com\0" "\00:1\0" "b\0" - "=E4=BA=8E 2010=E5=B9=B401=E6=9C=8827=E6=97=A5 16:00, Yan, Zheng =E5=86=99=\n" - "=E9=81=93:\n" + "\344\272\216 2010\345\271\26401\346\234\21027\346\227\245 16:00, Yan, Zheng \345\206\231\351\201\223:\n" "> 2010/1/27 Liuwenyi<qingshenlwy@gmail.com>:\n" - "> =20\n" + "> \n" ">> In this patch, I adjust the seqence of if-conditions.\n" ">> It will assess the page->private situation.\n" ">> First, we make sure the page->private is not null.\n" @@ -39,32 +38,30 @@ ">> index 009e3bd..a300dca 100644\n" ">> --- a/fs/btrfs/disk-io.c\n" ">> +++ b/fs/btrfs/disk-io.c\n" - ">> @@ -1407,11 +1407,11 @@ static int bio_ready_for_csum(struct bio *bi=\n" - "o)\n" + ">> @@ -1407,11 +1407,11 @@ static int bio_ready_for_csum(struct bio *bio)\n" ">>\n" ">> bio_for_each_segment(bvec, bio, i) {\n" - ">> page =3D bvec->bv_page;\n" - ">> - if (page->private =3D=3D EXTENT_PAGE_PRIVATE) {\n" + ">> page = bvec->bv_page;\n" + ">> - if (page->private == EXTENT_PAGE_PRIVATE) {\n" ">> + if (!page->private) {\n" - ">> length +=3D bvec->bv_len;\n" + ">> length += bvec->bv_len;\n" ">> continue;\n" ">> }\n" ">> - if (!page->private) {\n" - ">> + if (page->private =3D=3D EXTENT_PAGE_PRIVATE) {\n" - ">> length +=3D bvec->bv_len;\n" + ">> + if (page->private == EXTENT_PAGE_PRIVATE) {\n" + ">> length += bvec->bv_len;\n" ">> continue;\n" ">> }\n" ">> --\n" - ">> =20\n" + ">> \n" "> Why do you want to do this? The code is perfect safe even\n" "> page->private is NULL. Furthermore, your patch is malformed.\n" ">\n" "> Yan, Zheng\n" - "> =20\n" + "> \n" "Yes, I agree with you, this code is safe.\n" "But I think we should check whether the pointer is available first.\n" - "It is unnecessary judge the \"(page->private =3D=3D EXTENT_PAGE_PRIVATE)=\n" - "\"\n" + "It is unnecessary judge the \"(page->private == EXTENT_PAGE_PRIVATE)\"\n" "while page->private is null.\n" "\n" "\n" @@ -73,4 +70,4 @@ "Liuwenyi\n" 2010-1-27 -6076d752dc04659410e607d5dcb1a9dbd472d4b56300cb89b1f3b34f4858f033 +e361a95efe2d7d8d2ee5ec68f622aaab1c0958fee888fa65015195115f1125c6
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.