On 14.11.22 12:44, Damien Le Moal wrote >> @@ -1570,8 +1578,9 @@ static int zonefs_create_zgroup(struct zonefs_zone_data *zd, >> * Use the file number within its group as file name. >> */ >> snprintf(file_name, ZONEFS_NAME_MAX - 1, "%u", n); >> - if (!zonefs_create_inode(dir, file_name, zone, type)) { >> - ret = -ENOMEM; >> + dir = zonefs_create_inode(dir, file_name, zone, type); > > This one is for file inodes but you are overwriting dir, which will > totally mess things up for the next file inode to create. > >> + if (IS_ERR(dir)) { >> + ret = PTR_ERR(dir); >> goto free; >> } >> > Indeed I'm sorry. Will send a v3 ASAP.