From: Minh Diep Date: Wed, 29 Aug 2012 15:52:27 +0000 (-0700) Subject: LU-1795 lustre: remove LASSERT in dt_fiemap_get() X-Git-Tag: 2.3.51~151 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=06a502bd3717458c50af84af510046192de76771 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 --- 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); }