[LTP] [PATCH v4 1/2] Fix unlink09 test

Andrea Cervesato andrea.cervesato@suse.com
Tue Jul 2 16:02:00 CEST 2024


Hi,

feel free to add the modification.

On 7/2/24 15:57, Cyril Hrubis wrote:
> Hi!
>> +static void setup_inode_flag(const int fd, const int flag, const int reset)
> I find it a bit strange when we pass reset flag, since I would expect
> that if we pass non-zero to this function the flag would be set not
> reset.
>
> If you are find with it I will change the reset flag in to set flag and
> reverse the logic before pushing the changes...
>
>> +{
>> +	int attr;
>> +
>> +	SAFE_IOCTL(fd, FS_IOC_GETFLAGS, &attr);
>> +
>> +	if (reset)
>> +		attr &= ~flag;
>> +	else
>> +		attr |= flag;
>> +
>> +	SAFE_IOCTL(fd, FS_IOC_SETFLAGS, &attr);
>> +}

Andrea



More information about the ltp mailing list