On Mon, Aug 21, 2023 at 12:37:12PM -0700, Jaegeuk Kim wrote: > On 08/18, Guenter Roeck wrote: > > On Fri, Aug 18, 2023 at 05:35:25PM -0700, Jaegeuk Kim wrote: > > > May I know if this works? > > > > > > https://lore.kernel.org/linux-f2fs-devel/20230819003012.3473675-1-jaeg...@kernel.org/T/#u > > > > > > > Yes, that fixes the problem for me. That makes me wonder, though: > > Why not just use the _nested functions unconditionally ? > > I think we should ignore that in this case only. >
Not sure I understand. If CONFIG_DEBUG_LOCK_ALLOC is not enabled, the _nested functions map to the standard (unnested) functions. >From include/linux/rwsem.h: #ifdef CONFIG_DEBUG_LOCK_ALLOC ... #else # define down_read_nested(sem, subclass) down_read(sem) # define down_read_killable_nested(sem, subclass) down_read_killable(sem) # define down_write_nest_lock(sem, nest_lock) down_write(sem) # define down_write_nested(sem, subclass) down_write(sem) # define down_write_killable_nested(sem, subclass) down_write_killable(sem) # define down_read_non_owner(sem) down_read(sem) # define up_read_non_owner(sem) up_read(sem) #endif All you accomplish with the additional set of #ifdefs is to make the code more difficult to read. Never mind, I guess this is your call to make. Guenter _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel