All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Christoph Hellwig <hch@lst.de>, xfs@oss.sgi.com
Subject: Re: [PATCH, RFC] xfs: remove i_iolock and use i_rwsem in the VFS inode instead
Date: Thu, 18 Aug 2016 19:37:07 +0200	[thread overview]
Message-ID: <20160818173707.GA1240@lst.de> (raw)
In-Reply-To: <20160811215444.GY30192@twins.programming.kicks-ass.net>

On Thu, Aug 11, 2016 at 11:54:44PM +0200, Peter Zijlstra wrote:
> Sure, find below. Not been near a compiler.

It has now.  Below are the additions I need, and things seem to be
passing fine with that.

Note that to fit the existing XFS lock asserts I'm using
_lockdep_is_held directly instead of lockdep_assert_held_exclusive.
All the exports are there, but I'm just trying to make sure you're
not going to shout at me for that later :)

diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index 7f0098d..4cef9f8 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -345,7 +345,8 @@ static inline int lock_is_held(struct lockdep_map *lock)
 	return _lock_is_held(lock, -1);
 }
 
-#define lockdep_is_held(lock)	lock_is_held(&(lock)->dep_map)
+#define lockdep_is_held(lock)		lock_is_held(&(lock)->dep_map)
+#define _lockdep_is_held(lock, r)	_lock_is_held(&(lock)->dep_map, (r))
 
 extern void lock_set_class(struct lockdep_map *lock, const char *name,
 			   struct lock_class_key *key, unsigned int subclass,
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index abec578..f39573b 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -3778,7 +3778,7 @@ void lock_release(struct lockdep_map *lock, int nested,
 }
 EXPORT_SYMBOL_GPL(lock_release);
 
-int lock_is_held(struct lockdep_map *lock, int read)
+int _lock_is_held(struct lockdep_map *lock, int read)
 {
 	unsigned long flags;
 	int ret = 0;
@@ -3796,7 +3796,7 @@ int lock_is_held(struct lockdep_map *lock, int read)
 
 	return ret;
 }
-EXPORT_SYMBOL_GPL(lock_is_held);
+EXPORT_SYMBOL_GPL(_lock_is_held);
 
 struct pin_cookie lock_pin_lock(struct lockdep_map *lock)
 {

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2016-08-18 17:37 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-11 17:10 [PATCH, RFC] xfs: remove i_iolock and use i_rwsem in the VFS inode instead Christoph Hellwig
2016-08-11 21:54 ` Peter Zijlstra
2016-08-18 17:37   ` Christoph Hellwig [this message]
2016-08-19 13:27     ` Peter Zijlstra
2016-08-20  6:37       ` Christoph Hellwig
2016-08-22  8:34         ` Peter Zijlstra
2016-09-05 15:12           ` Christoph Hellwig
2016-09-07  7:43             ` Peter Zijlstra
2016-09-08  6:06               ` Ingo Molnar
2016-08-11 23:43 ` Dave Chinner
2016-08-12  2:50   ` Christoph Hellwig
2016-08-12  9:58     ` Dave Chinner
2016-09-05 15:15       ` Christoph Hellwig
2016-09-07 21:45         ` Dave Chinner
2016-09-08  6:54           ` Peter Zijlstra
2016-09-09  1:06             ` Dave Chinner
2016-09-09  8:21               ` Peter Zijlstra
2016-09-09  8:34                 ` Christoph Hellwig
2016-09-11  0:17                 ` Dave Chinner
2016-09-13 19:42                   ` Peter Zijlstra
2016-09-09  8:33           ` Christoph Hellwig
2016-09-09  8:44             ` Peter Zijlstra
2016-09-09  9:05               ` Christoph Hellwig
2016-09-09  9:51                 ` Peter Zijlstra
2016-09-10 16:20                   ` Christoph Hellwig

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=20160818173707.GA1240@lst.de \
    --to=hch@lst.de \
    --cc=peterz@infradead.org \
    --cc=xfs@oss.sgi.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.