diff options
author | Chao Yu | 2017-10-30 17:49:53 +0800 |
---|---|---|
committer | Jaegeuk Kim | 2017-11-05 16:42:03 -0800 |
commit | 3d26fa6be3c487fac7d87dc4a6f02a9ff0f6b1ef (patch) | |
tree | 2c09c5713e9c038bfa46697fb1bcd6375cbe2470 /fs/f2fs/segment.h | |
parent | ea6767337f86312ebe473585899a159bf50ef1b7 (diff) |
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>
Diffstat (limited to 'fs/f2fs/segment.h')
-rw-r--r-- | fs/f2fs/segment.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h index 8d93652d5b6a..245acb34cab5 100644 --- a/fs/f2fs/segment.h +++ b/fs/f2fs/segment.h @@ -231,7 +231,7 @@ struct sit_info { unsigned long *dirty_sentries_bitmap; /* bitmap for dirty sentries */ unsigned int dirty_sentries; /* # of dirty sentries */ unsigned int sents_per_block; /* # of SIT entries per block */ - struct mutex sentry_lock; /* to protect SIT cache */ + struct rw_semaphore sentry_lock; /* to protect SIT cache */ struct seg_entry *sentries; /* SIT segment-level cache */ struct sec_entry *sec_entries; /* SIT section-level cache */ |