diff options
| author | 2020-04-27 09:34:55 +0200 | |
|---|---|---|
| committer | 2020-04-27 09:34:55 +0200 | |
| commit | 96fa72ffb2155dba9ba8c5d282a1ff19ed32f177 (patch) | |
| tree | 97e3dad8795e54405d450315363d7006bc2c2e35 /fs/buffer.c | |
| parent | Add documentation on meaning of -EPROBE_DEFER (diff) | |
| parent | Linux 5.7-rc3 (diff) | |
| download | wireguard-linux-96fa72ffb2155dba9ba8c5d282a1ff19ed32f177.tar.xz wireguard-linux-96fa72ffb2155dba9ba8c5d282a1ff19ed32f177.zip | |
Merge 5.7-rc3 into driver-core-next
We need the driver core fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/buffer.c')
| -rw-r--r-- | fs/buffer.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index f73276d746bb..a60f60396cfa 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -967,7 +967,7 @@ grow_dev_page(struct block_device *bdev, sector_t block, struct page *page; struct buffer_head *bh; sector_t end_block; - int ret = 0; /* Will call free_more_memory() */ + int ret = 0; gfp_t gfp_mask; gfp_mask = mapping_gfp_constraint(inode->i_mapping, ~__GFP_FS) | gfp; @@ -1371,6 +1371,17 @@ void __breadahead(struct block_device *bdev, sector_t block, unsigned size) } EXPORT_SYMBOL(__breadahead); +void __breadahead_gfp(struct block_device *bdev, sector_t block, unsigned size, + gfp_t gfp) +{ + struct buffer_head *bh = __getblk_gfp(bdev, block, size, gfp); + if (likely(bh)) { + ll_rw_block(REQ_OP_READ, REQ_RAHEAD, 1, &bh); + brelse(bh); + } +} +EXPORT_SYMBOL(__breadahead_gfp); + /** * __bread_gfp() - reads a specified block and returns the bh * @bdev: the block_device to read from |
