Skip to content

Commit

Permalink
Revert "net: Properly annotate the try-lock for the seqlock"
Browse files Browse the repository at this point in the history
This reverts commit 3971227.

Link: https://lore.kernel.org/r/20201116171958.2opbksmgbznrjxu2@linutronix.de

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
  • Loading branch information
rostedt committed Dec 11, 2020
1 parent 609cce0 commit 9bfcda9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
9 changes: 9 additions & 0 deletions include/linux/seqlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,15 @@ static inline void write_seqlock(seqlock_t *sl)
__raw_write_seqcount_begin(&sl->seqcount);
}

static inline int try_write_seqlock(seqlock_t *sl)
{
if (spin_trylock(&sl->lock)) {
__raw_write_seqcount_begin(&sl->seqcount);
return 1;
}
return 0;
}

static inline void write_sequnlock(seqlock_t *sl)
{
__raw_write_seqcount_end(&sl->seqcount);
Expand Down
10 changes: 1 addition & 9 deletions include/net/sch_generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,16 +168,8 @@ static inline bool qdisc_run_begin(struct Qdisc *qdisc)
return false;
}
#ifdef CONFIG_PREEMPT_RT
if (spin_trylock(&qdisc->running.lock)) {
seqcount_t *s = &qdisc->running.seqcount;
/*
* Variant of write_seqcount_t_begin() telling lockdep that a
* trylock was attempted.
*/
__raw_write_seqcount_begin(s);
seqcount_acquire(&s->dep_map, 0, 1, _RET_IP_);
if (try_write_seqlock(&qdisc->running))
return true;
}
return false;
#else
/* Variant of write_seqcount_begin() telling lockdep a trylock
Expand Down

0 comments on commit 9bfcda9

Please sign in to comment.