Re: [PATCH v2 03/17] mm: Add folio_end_read()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



During a bisection of a different problem, I noticed that
commit 0b237047d5a7 ("mm: add folio_end_read()") added folio_end_read() as

----------------------------------------
+void folio_end_read(struct folio *folio, bool success)
+{
+       if (likely(success))
+               folio_mark_uptodate(folio);
+       folio_unlock(folio);
+}
----------------------------------------

but commit f8174a118122 ("ext4: use folio_end_read()") for unknown reason
removed folio_clear_uptodate() call when bio->bi_status != 0.

----------------------------------------
-       bio_for_each_folio_all(fi, bio) {
-               struct folio *folio = fi.folio;
-
-               if (bio->bi_status)
-                       folio_clear_uptodate(folio);
-               else
-                       folio_mark_uptodate(folio);
-               folio_unlock(folio);
-       }
+       bio_for_each_folio_all(fi, bio)
+               folio_end_read(fi.folio, bio->bi_status == 0);
----------------------------------------

Why

	else
		folio_clear_uptodate(folio);

part is missing in folio_end_read() ?





[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux