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>
Mon, 6 Nov 2017 00:42:03 +0000 (16:42 -0800)
commit3d26fa6be3c487fac7d87dc4a6f02a9ff0f6b1ef
tree2c09c5713e9c038bfa46697fb1bcd6375cbe2470
parentea6767337f86312ebe473585899a159bf50ef1b7
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