From: Andrew W Elble <aweits@rit.edu>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH v2] nfsd: fix locking validator warning on nfs4_ol_stateid->st_mutex class
Date: Wed, 08 Nov 2017 16:42:14 -0500 [thread overview]
Message-ID: <m21sl8o3bd.fsf@discipline.rit.edu> (raw)
In-Reply-To: <20171108205812.GP24262@fieldses.org> (J. Bruce Fields's message of "Wed, 8 Nov 2017 15:58:12 -0500")
"J. Bruce Fields" <bfields@fieldses.org> writes:
> On Tue, Nov 07, 2017 at 07:57:26PM -0500, Andrew Elble wrote:
>> The use of the st_mutex has been confusing the validator. Use the
>> proper nested notation so as to not produce warnings.
>
> Looking around, the usual pattern for simple nesting seems to be to use
> just mutex_lock() for the outer lock (equivalent to
> mutex_lock_nested(0)), and mutex_lock_nested(., SINGLE_DEPTH_NESTING)
> for the inner lock.
>
> Or we could define a new LOCK_STATEID_MUTEX, assuming the rule here is
> "lock stateid's are locked after open stateid's". Just a question of
> might be simpler to understand.
I'm okay with whatever you think is best here - my thought was that the
mutex_lock_nested(0) called more attention to how it was working given
that acquiring that lock class the second time is now a little bit more
hidden in nfsd4_lock_ol_stateid().
Thanks,
Andy
--
Andrew W. Elble
aweits@discipline.rit.edu
Infrastructure Engineer, Communications Technical Lead
Rochester Institute of Technology
PGP: BFAD 8461 4CCF DC95 DA2C B0EB 965B 082E 863E C912
next prev parent reply other threads:[~2017-11-08 21:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-08 0:57 [PATCH v2] nfsd: fix locking validator warning on nfs4_ol_stateid->st_mutex class Andrew Elble
2017-11-08 20:58 ` J. Bruce Fields
2017-11-08 21:42 ` Andrew W Elble [this message]
2017-11-08 21:43 ` J. Bruce Fields
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=m21sl8o3bd.fsf@discipline.rit.edu \
--to=aweits@rit.edu \
--cc=bfields@fieldses.org \
--cc=linux-nfs@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.