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]
Date:   Fri, 11 Aug 2023 20:23:13 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     akpm@...ux-foundation.org
Cc:     Hui Zhu <teawater@...group.com>, linux-fsdevel@...r.kernel.org,
        linux-ext4@...r.kernel.org
Subject: [PATCH 4/3] buffer: Use bdev_getblk() in __breadahead()


It occurs to me that this would also be useful and I'll include it in
the next version:

diff --git a/fs/buffer.c b/fs/buffer.c
index 122b7d16befb..b551a5b1196b 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -1470,7 +1470,9 @@ EXPORT_SYMBOL(__getblk_gfp);
  */
 void __breadahead(struct block_device *bdev, sector_t block, unsigned size)
 {
-       struct buffer_head *bh = __getblk(bdev, block, size);
+       struct buffer_head *bh = bdev_getblk(bdev, block, size,
+                       GFP_NOWAIT | __GFP_MOVABLE | __GFP_ACCOUNT);
+
        if (likely(bh)) {
                bh_readahead(bh, REQ_RAHEAD);
                brelse(bh);



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ