mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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:
parent
ea6767337f
commit
3d26fa6be3
3 changed files with 26 additions and 22 deletions
|
@ -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 */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue