X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fobdclass%2Fcl_page.c;h=29a570c9045b2503ce557775b09d6283637deb3d;hp=b34555a1fd65b19c4e50321d3d19969fcf7220b8;hb=c4f8279e40f9cbc6b266db19f239d8e175da089c;hpb=57267444aa67399b586b94073609c0ad9c4cb3b0 diff --git a/lustre/obdclass/cl_page.c b/lustre/obdclass/cl_page.c index b34555a..29a570c 100644 --- a/lustre/obdclass/cl_page.c +++ b/lustre/obdclass/cl_page.c @@ -1319,8 +1319,17 @@ void cl_page_completion(const struct lu_env *env, LASSERT(cl_page_is_vmlocked(env, pg)); LASSERT(pg->cp_sync_io == anchor); pg->cp_sync_io = NULL; + } + /* + * As page->cp_obj is pinned by a reference from page->cp_req, it is + * safe to call cl_page_put() without risking object destruction in a + * non-blocking context. + */ + cl_page_put(env, pg); + + if (anchor) cl_sync_io_note(anchor, ioret); - } + EXIT; } EXPORT_SYMBOL(cl_page_completion);