diff --git a/fs/lustre/lov/lov_object.c b/fs/lustre/lov/lov_object.c index d3ed5fc..51b95f2 100644 --- a/fs/lustre/lov/lov_object.c +++ b/fs/lustre/lov/lov_object.c @@ -1774,8 +1774,11 @@ static int lov_object_fiemap(const struct lu_env *env, struct cl_object *obj, struct fiemap_state fs = { NULL }; lsm = lov_lsm_addref(cl2lov(obj)); - if (!lsm) - return -ENODATA; + if (!lsm) { + /* no extent: there is no object for mapping */ + fiemap->fm_mapped_extents = 0; + return 0; + } if (!(fiemap->fm_flags & FIEMAP_FLAG_DEVICE_ORDER)) { /**