Just exactly what is f_sema protecting? I've looked at the code, and I just
can't figure out why we need a semaphore there at all.
AFAICS, all we are using them for is to protect the 2 lists f_shares and
f_blocks in struct nlm_file. Since we are already holding the BKL, I don't
see why we need an extra lock. (Yes: nlmsvc_delete_block() can sleep, so we
need to be careful with the loop in nlmsvc_traverse_blocks(), but that is
trivial to cope with...)
As for calling nlmclnt_lookup_host() in nlmsvc_create_block(). Why not just
pass the value that we looked up in nlmsvc_proc_lock()?
Cheers,
Trond
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/