Commit 719e9e08 authored by Jinshan Xiong's avatar Jinshan Xiong Committed by Greg Kroah-Hartman
Browse files

staging: lustre: osc: remove obsolete asserts



Remove the no longer needed assert in the function
osc_cache_truncate_start(). The assertion in
osc_object_prune() will become faulty with upcoming
changes. The reason this will become a problem is
that there may exist freeing pages in object's
radix tree at the time of osc_object_prune(), which
causes failure at the assertion of (osc->oo_npages == 0).
This patch prevents that problem from happening.

Signed-off-by: default avatarJinshan Xiong <jinshan.xiong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6271
Reviewed-on: http://review.whamcloud.com/16456
Reviewed-on: http://review.whamcloud.com/16727


Reviewed-by: default avatarBobi Jam <bobijam@hotmail.com>
Reviewed-by: default avatarJohn L. Hammond <john.hammond@intel.com>
Reviewed-by: default avatarJames Simmons <uja.ornl@yahoo.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1f0833a8
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -2790,7 +2790,6 @@ int osc_cache_truncate_start(const struct lu_env *env, struct osc_object *obj,
			 * We have to wait for this extent because we can't
			 * truncate that page.
			 */
			LASSERT(!ext->oe_hp);
			OSC_EXTENT_DUMP(D_CACHE, ext,
					"waiting for busy extent\n");
			waiting = osc_extent_get(ext);
+0 −4
Original line number Diff line number Diff line
@@ -200,10 +200,6 @@ static int osc_object_prune(const struct lu_env *env, struct cl_object *obj)
	struct osc_object       *osc = cl2osc(obj);
	struct ldlm_res_id      *resname = &osc_env_info(env)->oti_resname;

	LASSERTF(osc->oo_npages == 0,
		 DFID "still have %lu pages, obj: %p, osc: %p\n",
		 PFID(lu_object_fid(&obj->co_lu)), osc->oo_npages, obj, osc);

	/* DLM locks don't hold a reference of osc_object so we have to
	 * clear it before the object is being destroyed.
	 */