From: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: "Michal Koutný" <mkoutny-IBi9RG/b67k@public.gmane.org>
Cc: Zefan Li <lizefan.x-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org>,
Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>,
cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
kernel-team-b10kYP2dOMg@public.gmane.org
Subject: Re: [PATCH 1/2 cgroup/for-6.1] cgroup: Improve cftype add/rm error handling
Date: Tue, 6 Sep 2022 09:37:16 -1000 [thread overview]
Message-ID: <YxehbNMr998iITHi@slm.duckdns.org> (raw)
In-Reply-To: <20220906191112.GF30763-9OudH3eul5jcvrawFnH+a6VXKuFTiq87@public.gmane.org>
Hello,
On Tue, Sep 06, 2022 at 09:11:12PM +0200, Michal Koutný wrote:
> Before the return here, the function should revert the base files first (or
> silence the return value to 0 if such a partial population is acceptable).
>
> (Actually, it looks like the revert in the subsys branch is unnecessary as
> callers of css_populate_dir() would issue css_clear_dir() upon failure
> eventually.)
Yeah, so, the contract there is a bit unusual in that on failure the helpers
don't need to cleanup after themselves as they'll get cleaned up together by
the caller when it nukes the cgroup which was being created. While a bit
unusual, it's simpler / safer this way, so...
Thanks.
--
tejun
next prev parent reply other threads:[~2022-09-06 19:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-04 21:09 [PATCH 1/2 cgroup/for-6.1] cgroup: Improve cftype add/rm error handling Tejun Heo
[not found] ` <YxUUISLVLEIRBwEY-NiLfg/pYEd1N0TnZuCh8vA@public.gmane.org>
2022-09-04 21:10 ` [PATCH 2/2 cgroup/for-6.1] cgroup: Remove CFTYPE_PRESSURE Tejun Heo
2022-09-05 13:14 ` [PATCH 1/2 cgroup/for-6.1] cgroup: Improve cftype add/rm error handling Michal Koutný
[not found] ` <20220905131435.GA1765-9OudH3eul5jcvrawFnH+a6VXKuFTiq87@public.gmane.org>
2022-09-06 17:25 ` Tejun Heo
[not found] ` <YxeCdHfk2nOUISDw-NiLfg/pYEd1N0TnZuCh8vA@public.gmane.org>
2022-09-06 19:11 ` Michal Koutný
[not found] ` <20220906191112.GF30763-9OudH3eul5jcvrawFnH+a6VXKuFTiq87@public.gmane.org>
2022-09-06 19:37 ` Tejun Heo [this message]
2022-09-06 19:39 ` Tejun Heo
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=YxehbNMr998iITHi@slm.duckdns.org \
--to=tj-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org \
--cc=kernel-team-b10kYP2dOMg@public.gmane.org \
--cc=lizefan.x-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org \
--cc=mkoutny-IBi9RG/b67k@public.gmane.org \
/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