]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
bcache: add comments for mutex_lock(&b->write_lock)
authorColy Li <colyli@suse.de>
Fri, 28 Jun 2019 11:59:56 +0000 (19:59 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Sep 2019 06:23:21 +0000 (08:23 +0200)
commit9138558777944599716f90163b8d2b192cfe59cf
tree17d10878096961a8e8ff66418c8919c418183c69
parentb622ba2bcd4edf70a307db16e94f2292563bdc8d
bcache: add comments for mutex_lock(&b->write_lock)

When accessing or modifying BTREE_NODE_dirty bit, it is not always
necessary to acquire b->write_lock. In bch_btree_cache_free() and
mca_reap() acquiring b->write_lock is necessary, and this patch adds
comments to explain why mutex_lock(&b->write_lock) is necessary for
checking or clearing BTREE_NODE_dirty bit there.

Signed-off-by: Coly Li <colyli@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/bcache/btree.c