There is no way to get anything useful out of that. _Any_ kernel code
that relies on such counters to tell if there's somebody else who might've
accessed the thing does not account for the fact that fork() and dup()
do not go beyond the struct file.
IOW, any place that does
if (number of openers == 1)
do something that breaks if IO is going on
is FUBAR. Variant with
if (number of openers == 0)
block ->open()
do something ...
will work, but it means that we are not triggering it from ioctl() on that
device. And here we only care about zero/non-zero, so ->bd_openers on
the entire disk will do just fine.
-
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/