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>
This commit is contained in:
@@ -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 */
|
||||
|
||||
|
Reference in New Issue
Block a user