]> www.infradead.org Git - users/jedix/linux-maple.git/commit
nilfs2: refactor nilfs_segctor_thread()
authorRyusuke Konishi <konishi.ryusuke@gmail.com>
Mon, 26 Aug 2024 17:41:16 +0000 (02:41 +0900)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 2 Sep 2024 03:43:44 +0000 (20:43 -0700)
commit74b0099340e0be96b37f5f8b0b5d02b48bb25a2b
tree9b4b1322df591d7989cece7bea83f53a3ed4a456
parent3f66cc261ccb54a8e4d8d5aa51c389c19453b00c
nilfs2: refactor nilfs_segctor_thread()

Simplify nilfs_segctor_thread(), the main loop function of the log writer
thread, to make the basic structure easier to understand.

In particular, the acquisition and release of the sc_state_lock spinlock
was scattered throughout the function, so extract the determination of
whether log writing is required into a helper function and make the
spinlock lock sections clearer.

Link: https://lkml.kernel.org/r/20240826174116.5008-9-konishi.ryusuke@gmail.com
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Cc: Huang Xiaojia <huangxiaojia2@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/nilfs2/segment.c