Skip to content
Commit 9d7464c8 authored by Ioannis Angelakopoulos's avatar Ioannis Angelakopoulos Committed by David Sterba
Browse files

btrfs: change the lockdep class of free space inode's invalidate_lock



Reinitialize the class of the lockdep map for struct inode's
mapping->invalidate_lock in load_free_space_cache() function in
fs/btrfs/free-space-cache.c. This will prevent lockdep from producing
false positives related to execution paths that make use of free space
inodes and paths that make use of normal inodes.

Specifically, with this change lockdep will create separate lock
dependencies that include the invalidate_lock, in the case that free
space inodes are used and in the case that normal inodes are used.

The lockdep class for this lock was first initialized in
inode_init_always() in fs/inode.c.

Reviewed-by: default avatarJosef Bacik <josef@toxicpanda.com>
Signed-off-by: default avatarIoannis Angelakopoulos <iangelak@fb.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 8b53779e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment