From: Pavel Reichl <preichl@redhat.com>
To: linux-xfs@vger.kernel.org
Cc: Pavel Reichl <preichl@redhat.com>
Subject: [PATCH 2/4] xfs: Remove mr_writer field from mrlock_t
Date: Tue, 28 Jan 2020 15:55:26 +0100 [thread overview]
Message-ID: <20200128145528.2093039-3-preichl@redhat.com> (raw)
In-Reply-To: <20200128145528.2093039-1-preichl@redhat.com>
mr_writer field is no longer used by any code.
Signed-off-by: Pavel Reichl <preichl@redhat.com>
---
fs/xfs/mrlock.h | 17 +----------------
1 file changed, 1 insertion(+), 16 deletions(-)
diff --git a/fs/xfs/mrlock.h b/fs/xfs/mrlock.h
index 79155eec341b..1923be92a832 100644
--- a/fs/xfs/mrlock.h
+++ b/fs/xfs/mrlock.h
@@ -10,14 +10,11 @@
typedef struct {
struct rw_semaphore mr_lock;
-#if defined(DEBUG) || defined(XFS_WARN)
- int mr_writer;
-#endif
} mrlock_t;
#if defined(DEBUG) || defined(XFS_WARN)
#define mrinit(mrp, name) \
- do { (mrp)->mr_writer = 0; init_rwsem(&(mrp)->mr_lock); } while (0)
+ do { init_rwsem(&(mrp)->mr_lock); } while (0)
#else
#define mrinit(mrp, name) \
do { init_rwsem(&(mrp)->mr_lock); } while (0)
@@ -34,9 +31,6 @@ static inline void mraccess_nested(mrlock_t *mrp, int subclass)
static inline void mrupdate_nested(mrlock_t *mrp, int subclass)
{
down_write_nested(&mrp->mr_lock, subclass);
-#if defined(DEBUG) || defined(XFS_WARN)
- mrp->mr_writer = 1;
-#endif
}
static inline int mrtryaccess(mrlock_t *mrp)
@@ -48,17 +42,11 @@ static inline int mrtryupdate(mrlock_t *mrp)
{
if (!down_write_trylock(&mrp->mr_lock))
return 0;
-#if defined(DEBUG) || defined(XFS_WARN)
- mrp->mr_writer = 1;
-#endif
return 1;
}
static inline void mrunlock_excl(mrlock_t *mrp)
{
-#if defined(DEBUG) || defined(XFS_WARN)
- mrp->mr_writer = 0;
-#endif
up_write(&mrp->mr_lock);
}
@@ -69,9 +57,6 @@ static inline void mrunlock_shared(mrlock_t *mrp)
static inline void mrdemote(mrlock_t *mrp)
{
-#if defined(DEBUG) || defined(XFS_WARN)
- mrp->mr_writer = 0;
-#endif
downgrade_write(&mrp->mr_lock);
}
--
2.24.1
next prev parent reply other threads:[~2020-01-28 14:55 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-28 14:55 [PATCH 0/4] xfs: Remove wrappers for some semaphores Pavel Reichl
2020-01-28 14:55 ` [PATCH 1/4] xfs: change xfs_isilocked() to always use lockdep() Pavel Reichl
2020-01-28 16:42 ` Darrick J. Wong
2020-01-28 16:50 ` Pavel Reichl
2020-01-28 18:00 ` Eric Sandeen
2020-01-28 23:02 ` Dave Chinner
2020-01-29 22:18 ` Dave Chinner
2020-01-29 22:25 ` Darrick J. Wong
2020-01-29 23:20 ` Dave Chinner
2020-01-30 7:44 ` Christoph Hellwig
2020-01-30 20:14 ` Dave Chinner
2020-01-30 20:27 ` Bill O'Donnell
2020-01-28 14:55 ` Pavel Reichl [this message]
2020-01-28 14:55 ` [PATCH 3/4] xfs: Make i_lock and i_mmap native rwsems Pavel Reichl
2020-01-28 14:55 ` [PATCH 4/4] xfs: replace mr*() functions with native rwsem calls Pavel Reichl
2020-01-28 16:44 ` Darrick J. Wong
2020-01-30 7:45 ` Christoph Hellwig
2020-01-30 8:57 ` Pavel Reichl
2020-01-30 13:31 ` Christoph Hellwig
2020-01-30 13:43 ` Pavel Reichl
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=20200128145528.2093039-3-preichl@redhat.com \
--to=preichl@redhat.com \
--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 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.