lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230315123233.121593-3-p.raghav@samsung.com>
Date:   Wed, 15 Mar 2023 13:32:32 +0100
From:   Pankaj Raghav <p.raghav@...sung.com>
To:     hubcap@...ibond.com, senozhatsky@...omium.org, martin@...ibond.com,
        willy@...radead.org, minchan@...nel.org, viro@...iv.linux.org.uk,
        brauner@...nel.org, axboe@...nel.dk, akpm@...ux-foundation.org
Cc:     linux-kernel@...r.kernel.org, linux-block@...r.kernel.org,
        linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
        gost.dev@...sung.com, mcgrof@...nel.org, devel@...ts.orangefs.org,
        Pankaj Raghav <p.raghav@...sung.com>
Subject: [RFC PATCH 2/3] mpage: use bio_for_each_folio_all in mpage_end_io()

Use bio_for_each_folio_all to iterate through folios in a bio so that
the folios can be directly passed to the folio_endio() function.

Signed-off-by: Pankaj Raghav <p.raghav@...sung.com>
---
 fs/mpage.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/fs/mpage.c b/fs/mpage.c
index 40e86e839e77..bfcc139938a8 100644
--- a/fs/mpage.c
+++ b/fs/mpage.c
@@ -45,14 +45,11 @@
  */
 static void mpage_end_io(struct bio *bio)
 {
-	struct bio_vec *bv;
-	struct bvec_iter_all iter_all;
+	struct folio_iter fi;
 
-	bio_for_each_segment_all(bv, bio, iter_all) {
-		struct page *page = bv->bv_page;
-		folio_endio(page_folio(page), bio_op(bio),
-			   blk_status_to_errno(bio->bi_status));
-	}
+	bio_for_each_folio_all(fi, bio)
+		folio_endio(fi.folio, bio_op(bio),
+			    blk_status_to_errno(bio->bi_status));
 
 	bio_put(bio);
 }
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ