[LTP] [PATCH v4 1/2] Fix unlink09 test
Cyril Hrubis
chrubis@suse.cz
Tue Jul 2 15:57:31 CEST 2024
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);
> +}
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list