public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: xfs <linux-xfs@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Dave Chinner <david@fromorbit.com>,
	fdmanana@kernel.org
Subject: Re: [RFC PATCH] vfs: remove lockdep bogosity in __sb_start_write
Date: Tue, 3 Nov 2020 17:39:21 +0000	[thread overview]
Message-ID: <20201103173921.GA32219@infradead.org> (raw)
In-Reply-To: <20201103173300.GF7123@magnolia>

>  int __sb_start_write(struct super_block *sb, int level, bool wait)
>  {
> -	int ret = 1;
> +	if (!wait)
> +		return percpu_down_read_trylock(sb->s_writers.rw_sem + level-1);
>  
> +	percpu_down_read(sb->s_writers.rw_sem + level-1);
> +	return 1;
>  }
>  EXPORT_SYMBOL(__sb_start_write);

Please split the function into __sb_start_write and
__sb_start_write_trylock while you're at it..

  reply	other threads:[~2020-11-03 17:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-03 17:33 [RFC PATCH] vfs: remove lockdep bogosity in __sb_start_write Darrick J. Wong
2020-11-03 17:39 ` Christoph Hellwig [this message]
2020-11-03 18:34   ` Darrick J. Wong
2020-11-03 18:46     ` Christoph Hellwig
2020-11-03 19:37       ` Darrick J. Wong
2020-11-05 21:34         ` Dave Chinner
2020-11-06  2:19           ` Darrick J. Wong
2020-11-06  3:32             ` Dave Chinner
2020-11-03 18:33 ` [RFC PATCH 2/2] vfs: separate __sb_start_write into blocking and non-blocking helpers Darrick J. Wong

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=20201103173921.GA32219@infradead.org \
    --to=hch@infradead.org \
    --cc=darrick.wong@oracle.com \
    --cc=david@fromorbit.com \
    --cc=fdmanana@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.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