From: Dan Carpenter <dan.carpenter@oracle.com>
To: "Loïc Pefferkorn" <loic@loicp.eu>
Cc: Greg KH <gregkh@linuxfoundation.org>,
keith.mannthey@intel.com, devel@driverdev.osuosl.org,
andreas.dilger@intel.com, linux-kernel@vger.kernel.org,
oleg.drokin@intel.com, gdonald@gmail.com,
HPDD-discuss@ml01.01.org, john.hammond@intel.com
Subject: Re: [PATCH] staging: lustre: fix sparse warnings related to lock context imbalance
Date: Fri, 28 Nov 2014 13:00:45 +0300 [thread overview]
Message-ID: <20141128100045.GC4860@mwanda> (raw)
In-Reply-To: <20141127183410.GA4582@iron>
On Thu, Nov 27, 2014 at 07:34:10PM +0100, Loïc Pefferkorn wrote:
> 1827 if (valid != 0) {
> 1828 cl_object_attr_lock(obj);
> 1829 cl_object_attr_set(env, obj, attr, valid);
> 1830 cl_object_attr_unlock(obj);
>
> after:
>
> 1827 if (valid != 0) {
> 1828 spin_lock(cl_object_attr_guard(obj));
> 1829 cl_object_attr_set(env, obj, attr, valid);
> 1830 spin_unlock(cl_object_attr_guard(obj));
The word "_object" doesn't add any new information to the name. If you
remove it then the code is improved.
spin_lock(cl_attr_guard(obj));
cl_attr_set(env, obj, attr, valid);
spin_unlock(cl_attr_guard(obj));
regards,
dan carpenter
next prev parent reply other threads:[~2014-11-28 10:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-26 16:15 [PATCH] staging: lustre: fix sparse warnings related to lock context imbalance Loic Pefferkorn
2014-11-26 20:54 ` Greg KH
2014-11-27 5:30 ` Loïc Pefferkorn
2014-11-27 18:34 ` Loïc Pefferkorn
2014-11-28 10:00 ` Dan Carpenter [this message]
2014-11-28 15:45 ` [HPDD-discuss] " Patrick Farrell
2014-11-28 16:28 ` Dan Carpenter
2014-11-28 22:22 ` Greg KH
2014-11-30 19:54 ` Loïc Pefferkorn
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=20141128100045.GC4860@mwanda \
--to=dan.carpenter@oracle.com \
--cc=HPDD-discuss@ml01.01.org \
--cc=andreas.dilger@intel.com \
--cc=devel@driverdev.osuosl.org \
--cc=gdonald@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=john.hammond@intel.com \
--cc=keith.mannthey@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=loic@loicp.eu \
--cc=oleg.drokin@intel.com \
/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.