Re: [PATCH v2] zonefs: add sanity check for aggregated conventional zones

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux