From: "tip-bot2 for Thomas Gleixner" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
"Christian Brauner (Microsoft)" <brauner@kernel.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: sched/rt] dentry: Use preempt_[dis|en]able_nested()
Date: Mon, 19 Sep 2022 12:37:57 -0000 [thread overview]
Message-ID: <166359107791.401.1079842493025213678.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20220825164131.402717-3-bigeasy@linutronix.de>
The following commit has been merged into the sched/rt branch of tip:
Commit-ID: 93f6d4e1893657f07ba3c9e2bfa74b355a0b32f9
Gitweb: https://git.kernel.org/tip/93f6d4e1893657f07ba3c9e2bfa74b355a0b32f9
Author: Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 25 Aug 2022 18:41:25 +02:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Mon, 19 Sep 2022 14:35:07 +02:00
dentry: Use preempt_[dis|en]able_nested()
Replace the open coded CONFIG_PREEMPT_RT conditional
preempt_disable/enable() with the new helper.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Link: https://lore.kernel.org/r/20220825164131.402717-3-bigeasy@linutronix.de
---
fs/dcache.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/fs/dcache.c b/fs/dcache.c
index bb0c4d0..2ee8636 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -2597,15 +2597,7 @@ EXPORT_SYMBOL(d_rehash);
static inline unsigned start_dir_add(struct inode *dir)
{
- /*
- * The caller holds a spinlock (dentry::d_lock). On !PREEMPT_RT
- * kernels spin_lock() implicitly disables preemption, but not on
- * PREEMPT_RT. So for RT it has to be done explicitly to protect
- * the sequence count write side critical section against a reader
- * or another writer preempting, which would result in a live lock.
- */
- if (IS_ENABLED(CONFIG_PREEMPT_RT))
- preempt_disable();
+ preempt_disable_nested();
for (;;) {
unsigned n = dir->i_dir_seq;
if (!(n & 1) && cmpxchg(&dir->i_dir_seq, n, n + 1) == n)
@@ -2618,8 +2610,7 @@ static inline void end_dir_add(struct inode *dir, unsigned int n,
wait_queue_head_t *d_wait)
{
smp_store_release(&dir->i_dir_seq, n + 2);
- if (IS_ENABLED(CONFIG_PREEMPT_RT))
- preempt_enable();
+ preempt_enable_nested();
wake_up_all(d_wait);
}
next prev parent reply other threads:[~2022-09-19 12:38 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-25 16:41 [PATCH v2 0/8] Replace PREEMPT_RT ifdefs with preempt_[dis|en]able_nested() Sebastian Andrzej Siewior
2022-08-25 16:41 ` [PATCH v2 1/8] preempt: Provide preempt_[dis|en]able_nested() Sebastian Andrzej Siewior
2022-09-19 12:37 ` [tip: sched/rt] " tip-bot2 for Thomas Gleixner
2022-08-25 16:41 ` [PATCH v2 2/8] dentry: Use preempt_[dis|en]able_nested() Sebastian Andrzej Siewior
2022-08-26 7:52 ` Christian Brauner
2022-09-19 12:37 ` tip-bot2 for Thomas Gleixner [this message]
2022-08-25 16:41 ` [PATCH v2 3/8] mm/vmstat: " Sebastian Andrzej Siewior
2022-09-01 14:41 ` Michal Hocko
2022-09-19 12:37 ` [tip: sched/rt] " tip-bot2 for Thomas Gleixner
2022-08-25 16:41 ` [PATCH v2 4/8] mm/debug: Provide VM_WARN_ON_IRQS_ENABLED() Sebastian Andrzej Siewior
2022-09-01 14:41 ` Michal Hocko
2022-09-19 12:37 ` [tip: sched/rt] " tip-bot2 for Thomas Gleixner
2022-08-25 16:41 ` [PATCH v2 5/8] mm/memcontrol: Replace the PREEMPT_RT conditionals Sebastian Andrzej Siewior
2022-09-01 14:45 ` Michal Hocko
2022-09-19 12:37 ` [tip: sched/rt] " tip-bot2 for Thomas Gleixner
2022-08-25 16:41 ` [PATCH v2 6/8] mm/compaction: Get rid of RT ifdeffery Sebastian Andrzej Siewior
2022-09-19 12:37 ` [tip: sched/rt] " tip-bot2 for Thomas Gleixner
2022-08-25 16:41 ` [PATCH v2 7/8] flex_proportions: Disable preemption entering the write section Sebastian Andrzej Siewior
2022-09-19 12:37 ` [tip: sched/rt] " tip-bot2 for Sebastian Andrzej Siewior
2022-08-25 16:41 ` [PATCH v2 8/8] u64_stats: Streamline the implementation Sebastian Andrzej Siewior
2022-09-19 12:37 ` [tip: sched/rt] " tip-bot2 for Thomas Gleixner
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=166359107791.401.1079842493025213678.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=bigeasy@linutronix.de \
--cc=brauner@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=x86@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;
as well as URLs for NNTP newsgroup(s).