Signed-off-by: Christopher Hoffman <choffman@redhat.com>
caps = CEPH_CAP_AUTH_SHARED;
}
+ if (dname.size() > NAME_MAX) {
+ rc = -ENAMETOOLONG;
+ goto out;
+ }
+
// N.B.: we don't validate alternate_name we generate during wrapping
// matches the dentry. We probably should!
if (!_wrap_name(*diri, dname, alternate_name)) {
goto out;
}
- if (dname.size() > NAME_MAX) {
- rc = -ENAMETOOLONG;
- goto out;
- }
-
dn = get_or_create(diri.get(), dname.c_str());
/* Get extra requested caps on the last component */