From: Jinshan Xiong Date: Wed, 19 Dec 2012 17:12:23 +0000 (-0800) Subject: LU-2505 osc: use GFP_ATOMIC for ll_dirty_page_discard_warn() X-Git-Tag: 2.3.58~4 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=524569c84dd69d6768f6bacb6ba36e764dd26870 LU-2505 osc: use GFP_ATOMIC for ll_dirty_page_discard_warn() Because it can be called inside client obd list lock as follows: ll_dirty_page_discard_warn at ffffffffa0a3d252 [lustre] vvp_page_completion_common at ffffffffa0a7adfc [lustre] vvp_page_completion_write_common at ffffffffa0a7ae6b [lustre] vvp_page_completion_write at ffffffffa0a7b83e [lustre] cl_page_completion at ffffffffa05eed8f [obdclass] osc_completion at ffffffffa0880812 [osc] osc_ap_completion at ffffffffa086a544 [osc] brw_interpret at ffffffffa0876d69 [osc] Signed-off-by: Jinshan Xiong Change-Id: I04a4cc1142e019d39dccf2c1f3084c0298acff9d Reviewed-on: http://review.whamcloud.com/4870 Tested-by: Hudson Reviewed-by: Andreas Dilger Reviewed-by: Niu Yawei Tested-by: Maloo --- diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index 5615283..2b0e667 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -2435,7 +2435,8 @@ void ll_dirty_page_discard_warn(cfs_page_t *page, int ioret) struct dentry *dentry = NULL; struct ccc_object *obj = cl_inode2ccc(page->mapping->host); - buf = (char *)__get_free_page(GFP_KERNEL); + /* this can be called inside spin lock so use GFP_ATOMIC. */ + buf = (char *)__get_free_page(GFP_ATOMIC); if (buf != NULL) { dentry = d_find_alias(page->mapping->host); if (dentry != NULL)