From: Chris Wright Date: Tue, 29 Apr 2008 18:28:56 +0000 (-0700) Subject: add splice fix to 2.6.24 queue X-Git-Tag: v2.6.25.1~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=26492c495dba360ba796acab3df1590789eeeb8b;p=thirdparty%2Fkernel%2Fstable-queue.git add splice fix to 2.6.24 queue --- diff --git a/queue-2.6.24/series b/queue-2.6.24/series index afb1fa5a5bc..d8bd8c91e2a 100644 --- a/queue-2.6.24/series +++ b/queue-2.6.24/series @@ -1,3 +1,4 @@ +splice-use-mapping_gfp_mask.patch fix-oops-on-rmmod-capidrv.patch x86-fix-32-bit-x86-msi-x-allocation-leakage.patch tehuti-check-register-size.patch diff --git a/queue-2.6.24/splice-use-mapping_gfp_mask.patch b/queue-2.6.24/splice-use-mapping_gfp_mask.patch new file mode 100644 index 00000000000..84ff00964f3 --- /dev/null +++ b/queue-2.6.24/splice-use-mapping_gfp_mask.patch @@ -0,0 +1,33 @@ +From 4cd13504652d28e16bf186c6bb2bbb3725369383 Mon Sep 17 00:00:00 2001 +From: Hugh Dickins +Date: Thu, 3 Apr 2008 23:35:22 +0100 +Message-ID: +Subject: splice: use mapping_gfp_mask + +upstream commit: 4cd13504652d28e16bf186c6bb2bbb3725369383 + +The loop block driver is careful to mask __GFP_IO|__GFP_FS out of its +mapping_gfp_mask, to avoid hangs under memory pressure. But nowadays +it uses splice, usually going through __generic_file_splice_read. That +must use mapping_gfp_mask instead of GFP_KERNEL to avoid those hangs. + +Signed-off-by: Hugh Dickins +Cc: Jens Axboe +Cc: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Chris Wright +--- + fs/splice.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/fs/splice.c ++++ b/fs/splice.c +@@ -314,7 +314,7 @@ __generic_file_splice_read(struct file * + break; + + error = add_to_page_cache_lru(page, mapping, index, +- GFP_KERNEL); ++ mapping_gfp_mask(mapping)); + if (unlikely(error)) { + page_cache_release(page); + if (error == -EEXIST)