]> git.baikalelectronics.ru Git - kernel.git/commit
erofs: simplify try_to_claim_pcluster()
authorGao Xiang <hsiangkao@redhat.com>
Tue, 8 Dec 2020 09:58:34 +0000 (17:58 +0800)
committerGao Xiang <hsiangkao@redhat.com>
Tue, 8 Dec 2020 10:08:22 +0000 (18:08 +0800)
commit4b3aff5c257904e450bad829759c2c22d8c75cd4
tree1bab87764a1abd3314d171e808240a547909c9a5
parentc61485eca4ec78ef0e67f630dba3a4cb56dea9e7
erofs: simplify try_to_claim_pcluster()

simplify try_to_claim_pcluster() by directly using cmpxchg() here
(the retry loop caused more overhead.) Also, move the chain loop
detection in and rename it to z_erofs_try_to_claim_pcluster().

Link: https://lore.kernel.org/r/20201208095834.3133565-3-hsiangkao@redhat.com
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
fs/erofs/zdata.c