From: Cyril Hrubis <chrubis@suse.cz>
To: Andrea Cervesato <andrea.cervesato@suse.de>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v4 1/2] Fix unlink09 test
Date: Tue, 2 Jul 2024 15:57:31 +0200 [thread overview]
Message-ID: <ZoQHSwgeD--VPnAQ@yuki> (raw)
In-Reply-To: <20240702-unlink09-v4-1-d8df24772a76@suse.com>
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
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2024-07-02 13:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-02 7:38 [LTP] [PATCH v4 0/2] Fix unlink09 test Andrea Cervesato
2024-07-02 7:38 ` [LTP] [PATCH v4 1/2] " Andrea Cervesato
2024-07-02 13:57 ` Cyril Hrubis [this message]
2024-07-02 14:02 ` Andrea Cervesato via ltp
2024-07-02 14:18 ` Cyril Hrubis
2024-07-02 7:38 ` [LTP] [PATCH v4 2/2] Add unlink10 test Andrea Cervesato
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZoQHSwgeD--VPnAQ@yuki \
--to=chrubis@suse.cz \
--cc=andrea.cervesato@suse.de \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox