Whamcloud - gitweb
patches related to bug 13377 (CMD small fixes), 2+4 patch and fid_unpack patch
[fs/lustre-release.git] / lustre / obdclass / dt_object.c
index 07ea54b..404b29e 100644 (file)
@@ -157,7 +157,8 @@ static int dt_lookup(const struct lu_env *env, struct dt_object *dir,
         if (dt_try_as_dir(env, dir)) {
                 result = dir->do_index_ops->dio_lookup(env, dir, rec, key,
                                                        BYPASS_CAPA);
-                fid_unpack(pack, fid);
+                if (result == 0)
+                        result = fid_unpack(pack, fid);
         } else
                 result = -ENOTDIR;
         return result;