backing file: free directly
Backing files are never installed into file descriptor tables and are
explicitly documented as such. They aren't subject to rcu access
conditions like regular files are at all.
Their lifetime is bound to the lifetime of the overlayfs file, i.e.,
they're stashed in ovl_file->private_data and go away otherwise. If
they're set as vma->vm_file then they're subject to regular refcount
rules. All in all I don't see any need for call_rcu() here.
Add an explicit WARN_ON_ONCE() so we catch any case where someone is
suddenly trying to install one of those things into a file descriptor
table so we can have nice long chat with them.
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
2 files changed