Re: [PATCH 1/4] namespace: take lock_mount_hash() directly when changing flags

2020-07-14 Thread Jann Horn
On Tue, Jul 14, 2020 at 6:16 PM Christian Brauner wrote: > Changing mount options always ends up taking lock_mount_hash() but when > MNT_READONLY is requested and neither the mount nor the superblock are > not already MNT_READONLY we end up taking the lock, dropping it, and > retaking it to change

[PATCH 1/4] namespace: take lock_mount_hash() directly when changing flags

2020-07-14 Thread Christian Brauner
Changing mount options always ends up taking lock_mount_hash() but when MNT_READONLY is requested and neither the mount nor the superblock are not already MNT_READONLY we end up taking the lock, dropping it, and retaking it to change the other mount attributes. Instead of this, acquire the lock onc