vxfs_readdir locking incorrect: add lock_kernel() or remove unlock_kernel()?
Commit 7b2fd697427e73c81d5fa659efd91bd07d303b0e in the historical GIT tree stopped calling the readdir member of a file_operations struct with the big kernel lock held, and fixed up all the readdir functions to do their own locking. However, that change added calls to unlock_kernel() in vxfs_readdir (fs/freevxfs/vxfs_lookup.c), but no call to lock_kernel(). Should vxfs_readdir call lock_kernel(), or should the calls to unlock_kernel() go away?
- Josh Triplett
Quoted 6 lines · On Mon, 24 Jul 2006 15:42:17 -0700 Josh Triplett <[email protected]> wrote:
Commit
7b2fd697427e73c81d5fa659efd91bd07d303b0ein the historical GIT tree stopped calling the readdir member of afile_operationsstruct with the big kernel lock held, and fixed up all the readdir functions to do their own locking. However, that change added calls tounlock_kernel()invxfs_readdir(fs/freevxfs/vxfs_lookup.c), but no call tolock_kernel().
That would appear to imply that nobody has used freevxfs in four years.
Quoted 2 lines
Should
vxfs_readdircalllock_kernel(), or should the
calls tounlock_kernel()go away?
I don't see anything in there which needs the locking, apart from perhaps f_pos updates. But it's probably best to add the lock_kernel() - this is a bugfixing exercise, not a remove-BKL-from-freevxfs exercise.
Quoted 1 line · Andrew Morton
That would appear to imply that nobody has used freevxfs in four years.
Given that...
Quoted 3 lines
I don't see anything in there which needs the locking, apart from perhaps
f_posupdates. But it's probably best to add thelock_kernel()- this is a bugfixing exercise, not a remove-BKL-from-freevxfs exercise.
Should we consider a remove-freevxfs-from-kernel exercise?