History

locking/rwsem: Fix up_read_non_owner() warning with DEBUG_RWSEMS

It was found that the use of up_read_non_owner() in NFS was causing the following warning when DEBUG_RWSEMS was configured. DEBUG_LOCKS_WARN_ON(sem->owner != ((struct task_struct *)(1UL << 0))) Looking into the rwsem.c file, it was discovered that the corresponding down_read_non_owner() function was not setting the owner field properly. This is fixed now, and the warning should be gone.

Waiman Long committed 8 years ago

Commit 03eeafd1 parent 7ea959c1 file · +1 −0Browse files

Showing the changes to kernel (1 of 1 file). Show all

Unified · Split

kernel/locking/rwsem.c+1−0
@@ -181,6 +181,7 @@ void down_read_non_owner(struct rw_semaphore *sem) · 180 unmodified lines
181 might_sleep();181 might_sleep();
182 182
183 __down_read(sem);183 __down_read(sem);
184 rwsem_set_reader_owned(sem);
184}185}
185 186
186EXPORT_SYMBOL(down_read_non_owner);187EXPORT_SYMBOL(down_read_non_owner);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t