linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Cc: linux-fsdevel@vger.kernel.org,
	David Howells <dhowells@redhat.com>,
	linux-kernel@vger.kernel.org,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Dmitry Monakhov <dmtrmonakhov@yandex-team.ru>
Subject: Re: [PATCH] fs/namespace: handle mount(MS_BIND|MS_REMOUNT) without locking sb->s_umount
Date: Wed, 18 Mar 2020 07:46:28 -0700	[thread overview]
Message-ID: <20200318144628.GI22433@bombadil.infradead.org> (raw)
In-Reply-To: <158454107541.4470.14819321770893756073.stgit@buzz>

On Wed, Mar 18, 2020 at 05:17:55PM +0300, Konstantin Khlebnikov wrote:
> @@ -459,11 +459,11 @@ void mnt_drop_write_file(struct file *file)
>  }
>  EXPORT_SYMBOL(mnt_drop_write_file);
>  
> +/* mount_lock must be held */
>  static int mnt_make_readonly(struct mount *mnt)
>  {
>  	int ret = 0;
>  
> -	lock_mount_hash();

I'd rather see
+	lockdep_assert_held_write(&mount_lock);
than a comment.  Maybe wrapped up into a macro like assert_hash_locked().


      reply	other threads:[~2020-03-18 14:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-18 14:17 [PATCH] fs/namespace: handle mount(MS_BIND|MS_REMOUNT) without locking sb->s_umount Konstantin Khlebnikov
2020-03-18 14:46 ` Matthew Wilcox [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200318144628.GI22433@bombadil.infradead.org \
    --to=willy@infradead.org \
    --cc=dhowells@redhat.com \
    --cc=dmtrmonakhov@yandex-team.ru \
    --cc=khlebnikov@yandex-team.ru \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).