+ ret = -errno;
+ } else if (ret == 0) {
+ /*
+ * We created the directory. Set its ownership to the
+ * user/group specified.
+ */
+ ret = chown(tmp, uid, gid);
+ if (ret < 0) {
+ perror("chown in mkdir recursive");
+ ret = -errno;
+ goto umask_error;
+ }