Skip to content

Commit

Permalink
sunrpc/svc: use store_release_wake_up()
Browse files Browse the repository at this point in the history
svc_thread_init_status() contains an open-coded
store_release_wake_up().  It is cleaner to use that function directly
rather than needing to remember the barrier.

Signed-off-by: NeilBrown <neilb@suse.de>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
  • Loading branch information
NeilBrown authored and Chuck Lever committed Jan 6, 2025
1 parent 935fee5 commit 6e1d75f
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions include/linux/sunrpc/svc.h
Original file line number Diff line number Diff line change
Expand Up @@ -327,12 +327,7 @@ static inline bool svc_thread_should_stop(struct svc_rqst *rqstp)
*/
static inline void svc_thread_init_status(struct svc_rqst *rqstp, int err)
{
rqstp->rq_err = err;
/* memory barrier ensures assignment to error above is visible before
* waitqueue_active() test below completes.
*/
smp_mb();
wake_up_var(&rqstp->rq_err);
store_release_wake_up(&rqstp->rq_err, err);
if (err)
kthread_exit(1);
}
Expand Down

0 comments on commit 6e1d75f

Please sign in to comment.