commit 1a825fd5424d59bdd791491a952ede2f99dae24c
Author: Hugh Dickins <[EMAIL PROTECTED]>
Date:   Thu Apr 3 23:35:22 2008 +0100

    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 <[EMAIL PROTECTED]>
    Cc: Jens Axboe <[EMAIL PROTECTED]>
    Cc: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
    Signed-off-by: Chris Wright <[EMAIL PROTECTED]>

diff --git a/fs/splice.c b/fs/splice.c
index e313478..109153c 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -314,7 +314,7 @@ __generic_file_splice_read(struct file *in, loff_t *ppos,
                                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)
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs

Reply via email to