Wendy Cheng wrote:
The point here is "with this patch, f_locks it not used at all any
more." Note that we have a nice inline function "nlm_file_inuse", why
should we use f_locks (that I assume people agree that it is awkward)
? Could we simply drop f_locks all together in this section of code?
Start to have a second thought about this ....
Removing f_locks does make the code much more readable. However, if
inode->i_flock list is long, e.g. large amount of (clients) hosts and/or
processes from other hosts competing for the same lock, we don't want to
do the list walk twice within nlm_traverse_files(). Intuitively this is
unlikely but I prefer not changing the current behavior. As the result,
I'm withdrawing the patch all together.
The first patch will handle the issue correctly. Will submit it after
this post.
-- Wendy