f2fs: use rw_semaphore to protect SIT cache
authorChao Yu <yuchao0@huawei.com>
Mon, 30 Oct 2017 09:49:53 +0000 (17:49 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 19 Dec 2017 03:38:23 +0000 (19:38 -0800)
commitd3ad907d7caaa56a0b1ba03913d54ab3ddc31569
tree36ae45a2e6dfbe9494223f3296b141b0514a334d
parentd9e1a6b6966bb444971b7cdd2713226881bda023
f2fs: use rw_semaphore to protect SIT cache

There are some cases user didn't update SIT cache under this lock,
so let's use rw_semaphore instead of mutex to enhance concurrently
accessing.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/gc.c
fs/f2fs/segment.c
fs/f2fs/segment.h