Patch "bufferhead: Add _gfp version for sb_getblk()" has been added to the 4.1-stable tree
This is a note to let you know that I've just added the patch titled
bufferhead: Add _gfp version for sb_getblk()
to the 4.1-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
bufferhead-add-_gfp-version-for-sb_getblk.patch
and it can be found in the queue-4.1 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
bd7ade3cd9b0850264306f5c2b79024a417b6396Mon Sep 17 00:00:00 2001
From: Nikolay Borisov <[email protected]>
Date: Thu, 2 Jul 2015 01:32:44 -0400
Subject: bufferhead: Add _gfp version for sb_getblk()
From: Nikolay Borisov <[email protected]>
commit bd7ade3cd9b0850264306f5c2b79024a417b6396 upstream.
sb_getblk() is used during ext4 (and possibly other FSes) writeback paths. Sometimes such path require allocating memory and guaranteeing that such allocation won't block. Currently, however, there is no way to provide user flags for sb_getblk which could lead to deadlocks.
This patch implements a sb_getblk_gfp with the only difference it can accept user-provided GFP flags.
--- include/linux/buffer_head.h | 7 +++++++ 1 file changed, 7 insertions(+)
include/linux/buffer_head.h +7 -0
@@ -317,6 +317,13 @@ sb_getblk(struct super_block *sb, sectorreturn __getblk_gfp (sb->s_bdev, block, sb->s_blocksize, __GFP_MOVABLE); } + +static inline struct buffer_head * +sb_getblk_gfp (struct super_block *sb,sector_t block,gfp_t gfp) +{ +return __getblk_gfp (sb->s_bdev, block, sb->s_blocksize, gfp); +} +static inline struct buffer_head *sb_find_get_block (struct super_block *sb,sector_t block) {
Patches currently in stable-queue which might be from [email protected] are
queue-4.1/bufferhead-add-_gfp-version-for-sb_getblk.patch queue-4.1/ext4-avoid-deadlocks-in-the-writeback-path-by-using-sb_getblk_gfp.patch