Whamcloud - gitweb
LU-2505 osc: use GFP_ATOMIC for ll_dirty_page_discard_warn()
authorJinshan Xiong <jinshan.xiong@intel.com>
Wed, 19 Dec 2012 06:44:42 +0000 (22:44 -0800)
committerOleg Drokin <green@whamcloud.com>
Wed, 19 Dec 2012 16:29:29 +0000 (11:29 -0500)
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 <jinshan.xiong@intel.com>
Change-Id: Ia1ee6c9885941068a358c5a6aeaa9bd47a9f9b7b
Reviewed-on: http://review.whamcloud.com/4866
Tested-by: Hudson
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/llite_lib.c

index 7526bbe..e4cf5f7 100644 (file)
@@ -2276,7 +2276,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)