Not meaning to pile more work onto your efforts, but ...
The more serious problem with the current files usage (and tangentially
related to the revoke() issue) is the problem with one clone process
closing a file out from under another clone using the same files
structure. I think this needs to be handled by wrapping access to the
files with a get_file()/put_file() operation, which would then
increment/decrement the use count in the file structure.
This would need to be done everywhere that the files structure is
accessed, and the put_file has to be on all the exit paths, so it's a
substantial set of changes.
Also, I think there's still an effort to rework the files structure
allocation (Zlatko Calusic was working on this.) So probably these
efforts should be coordinated, as the patches will collide terribly
otherwise.
Regards,
Bill