diff options
author | Bart Van Assche <bvanassche@acm.org> | 2022-02-22 21:43:13 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2022-02-25 22:11:31 +0300 |
commit | c7f91bd4102902384137dd5c50d04bfed27050dd (patch) | |
tree | 22ce0b6afde97965a77fb8182f63fa4dadd46bb3 /fs/f2fs/super.c | |
parent | 2fef99b8372c1ae3d8445ab570e888b5a358dbe9 (diff) | |
download | linux-c7f91bd4102902384137dd5c50d04bfed27050dd.tar.xz |
f2fs: Restore rwsem lockdep support
Lockdep uses lock class keys in its analysis. init_rwsem() instantiates
one lock class key with each init_rwsem() user as follows:
#define init_rwsem(sem) \
do { \
static struct lock_class_key __key; \
\
__init_rwsem((sem), #sem, &__key); \
} while (0)
Commit e4544b63a7ee ("f2fs: move f2fs to use reader-unfair rwsems") reduced
the number of lock class keys from one per init_rwsem() user to one per
file in which init_f2fs_rwsem() is used. This causes the same lock class key
to be associated with multiple f2fs rwsems and also triggers a number of
false positive lockdep deadlock reports. Fix this by again instantiating one
lock class key with each init_f2fs_rwsem() caller.
Cc: Tim Murray <timmurray@google.com>
Reported-by: syzbot+0b9cadf5fc45a98a5083@syzkaller.appspotmail.com
Fixes: e4544b63a7ee ("f2fs: move f2fs to use reader-unfair rwsems")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/super.c')
0 files changed, 0 insertions, 0 deletions