From 06a502bd3717458c50af84af510046192de76771 Mon Sep 17 00:00:00 2001 From: Minh Diep Date: Wed, 29 Aug 2012 08:52:27 -0700 Subject: [PATCH] LU-1795 lustre: remove LASSERT in dt_fiemap_get() dt_fiemap_get should return EOPNOTSUPP instead of issuing a LASSERT when it's not supported on the underlying filesystem Signed-off-by: Minh Diep Change-Id: I2cd5044472af3deeb77dbc54ced93f7e553586aa Reviewed-on: http://review.whamcloud.com/3817 Tested-by: Hudson Reviewed-by: Andreas Dilger Tested-by: Maloo --- lustre/include/dt_object.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lustre/include/dt_object.h b/lustre/include/dt_object.h index f95563a..c57fc00 100644 --- a/lustre/include/dt_object.h +++ b/lustre/include/dt_object.h @@ -1114,7 +1114,8 @@ static inline int dt_fiemap_get(const struct lu_env *env, struct dt_object *d, LASSERT(d); if (d->do_body_ops == NULL) return -EPROTO; - LASSERT(d->do_body_ops->dbo_fiemap_get); + if (d->do_body_ops->dbo_fiemap_get == NULL) + return -EOPNOTSUPP; return d->do_body_ops->dbo_fiemap_get(env, d, fm); } -- 1.8.3.1