linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Matthew Wilcox <willy@infradead.org>
Cc: viro@zeniv.linux.org.uk, jack@suse.com,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	lurodriguez@suse.de
Subject: Re: [PATCH v2] vfs: avoid dereferencing pointers in iterate_supers callbacks
Date: Thu, 17 May 2018 14:55:36 -0400	[thread overview]
Message-ID: <49934b3d13263360fbf26bc56de2914db0b3513a.camel@kernel.org> (raw)
In-Reply-To: <20180517182638.GD26718@bombadil.infradead.org>

On Thu, 2018-05-17 at 11:26 -0700, Matthew Wilcox wrote:
> On Thu, May 17, 2018 at 01:43:36PM -0400, Jeff Layton wrote:
> > @@ -107,12 +109,10 @@ static void fdatawait_one_bdev(struct block_device *bdev, void *arg)
> >   */
> >  void ksys_sync(void)
> >  {
> > -	int nowait = 0, wait = 1;
> > -
> >  	wakeup_flusher_threads(WB_REASON_SYNC);
> >  	iterate_supers(sync_inodes_one_sb, NULL);
> > -	iterate_supers(sync_fs_one_sb, &nowait);
> > -	iterate_supers(sync_fs_one_sb, &wait);
> > +	iterate_supers(sync_fs_one_sb, NULL);
> > +	iterate_supers(sync_fs_one_sb, (void *)1UL);
> 
> I think this is actually less clear.  How about:
> 
> 	void *wait = (void *)1UL;
> 
> 	iterate_supers(sync_fs_one_sb, !wait);
> 	iterate_supers(sync_fs_one_sb, wait);
> 

Sure, I could do that. We could also keep the wait/nowait vars too, I
guess.

  reply	other threads:[~2018-05-17 18:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-17 15:46 [PATCH] vfs: change iterate_supers callback to take an int arg instead of a void * Jeff Layton
2018-05-17 16:39 ` Jan Kara
2018-05-17 16:55   ` Jeff Layton
2018-05-17 17:43 ` [PATCH v2] vfs: avoid dereferencing pointers in iterate_supers callbacks Jeff Layton
2018-05-17 18:26   ` Matthew Wilcox
2018-05-17 18:55     ` Jeff Layton [this message]
2018-05-17 21:54 ` [PATCH v3] " Jeff Layton
2018-05-18  9:32   ` Jan Kara

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=49934b3d13263360fbf26bc56de2914db0b3513a.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=jack@suse.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lurodriguez@suse.de \
    --cc=viro@zeniv.linux.org.uk \
    --cc=willy@infradead.org \
    /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).