debugfs_remove_recursive() while a file is in use by userspace

Rajat Jain <[email protected]> Mon, 28 Dec 2015 12:27:22 -0800
Newsgroups org.kernel.vger.linux-newbie,org.kernel.vger.linux-kernel
Message-ID <CAA93t1pTkDpaZpQuVu0bQpxsxxUDViKU6-bLbporqkyHCJ0=mw@mail.gmail.com>
Hi,

I wanted to understand the behavior taken when a module calls
debugfs_remove_recursive() on a directory, while files under that
directory may still be in use by the userspace (for instance an
ongoing read / write operation).

Does the function wait

(1) until all the currently executing file operation methods
(read/write/map etc) have returned?
OR
(2) until the user has given up all references (descriptors) to the
files under the directory (i.e. until release() method has been
called)?

Thanks,

Rajat