Re: [PATCH 1/2 cgroup/for-6.1] cgroup: Improve cftype add/rm error handling

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

 



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



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux