Whamcloud - gitweb
LU-17592 build: kernel 6.8 removed strlcpy()
[fs/lustre-release.git] / lustre / osd-zfs / osd_oi.c
index b51ae1e..9389c2f 100644 (file)
@@ -130,9 +130,9 @@ osd_oi_lookup(const struct lu_env *env, struct osd_device *o,
        if (rc)
                return rc;
 
-       rc = strlcpy(oi->oi_name, name, sizeof(oi->oi_name));
-       if (rc >= sizeof(oi->oi_name))
-               return -E2BIG;
+       rc = strscpy(oi->oi_name, name, sizeof(oi->oi_name));
+       if (rc < 0)
+               return rc;
 
        oi->oi_zapid = zde->zde_dnode;