A message for Linux.com registered users: We are in the process of making changes to the Linux forums. Starting Monday, 8/13/18 at 6:00 PM PT, you will be unable to access the forums. They will re-launch as soon as possible on Wednesday, 8/15/18 with new features and improved functionality. Thank you for your patience and stay tuned for the new improved forums.
filesystem driver -- how to prevent remount?
Writing a file system driver. Would like to prevent multiple mounts over the same mountpoint. Prior to 2.5 the dentry structure had a d_covers field that pointed at the mountpoint. You could check that against the requested mountpoint to see if it was already in use.
I would rather not test the path of the device being mounted, because it could possibly be mounted elsewhere, I want to test the mountpoint so it is not overloaded with multiple mounts.
How do you do this without the now missing d_covers field?