On Wed, Aug 30, 2023 at 08:15:18PM +0200, Bernd Schubert wrote: > File systems want to hold a shared lock for DIO writes, > but may need to drop file priveliges - that a requires an > exclusive lock. The new export function file_needs_remove_privs() > is added in order to first check if that is needed. As said last time - the existing file systems with shared locking for direct I/O just do the much more pessimistic IS_SEC check here. I'd suggest to just do that for btrfs first step. If we then have numbers justifying the finer grained check we should update veryone and not just do it for one place.