Re: [PATCH] mm/damon/tests: use scoped_guard() for damon_test_ops_registration
SJ Park <[email protected]>
| Newsgroups | org.kvack.linux-mm,dev.linux.lists.damon,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Hi Jaeyeon, Thank you for sending this patch! On Sat, 15 Aug 2026 16:30:39 +0200 Jaeyeon Lee <[email protected]> wrote: > Replace manual mutex_lock() and mutex_unlock() calls with the > scoped_guard() macro. This simplifies the code, improves readability, > and ensures that the lock is automatically released when the scope > ends, preventing potential lock leaks in the future. I'm concerned if DAMON community is not familiar enough with scoped_guard() macro to handle it well. At least I'm not yet familiar with it. That said, it seems using it for one function in the unit test could be a safe and good start. So I want to have this change. It is not because I want all DAMON code to use scoped guard, though. I want to take this change because I want to see if it is really safe and easy to maintain. In other words, let's not adopt scoped guard to more parts of DAMON code, for now. Thank you for introducing scoped guard to DAMON! > > Signed-off-by: Jaeyeon Lee <[email protected]> Reviewed-by: SJ Park <[email protected]> I applied this patch to damon/next [1] tree. We are now quite close to next merge window. We (mm community) want to focus on making mm.git more stabilized and therefore ready for the next merge window, rather than adding more changes that are not really urgent. I understand this series is not really urgent. Hence, Andrew might not add this patch until next -rc1 release. In the case, I will request adding this to mm.git after next -rc1 release. So, no action from your side is needed for now. Let me know if you think this is really urgent. [1] https://origin.kernel.org/doc/html/latest/mm/damon/maintainer-profile.html#scm-trees Thanks, SJ [...]