From: Thierry Reding <thierry.reding@gmail.com>
To: Trond Myklebust <trond.myklebust@primarydata.com>
Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] NFS: Use smp_mb__{before,after}_atomic()
Date: Fri, 30 May 2014 11:06:55 +0200 [thread overview]
Message-ID: <1401440815-4227-1-git-send-email-thierry.reding@gmail.com> (raw)
From: Thierry Reding <treding@nvidia.com>
Commit febdbfe8a91c (arch: Prepare for smp_mb__{before,after}_atomic())
deprecated the smp_mb__{before,after}_{atomic,clear}_{dec,inc,bit}*()
functions in favour of the unified smp_mb__{before,after}_atomic().
While at it, convert the smb_mb__before_atomic()/clear_bit() pattern to
the more idiomatic clear_bit_unlock().
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
fs/nfs/pagelist.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c
index 353331969626..c00d4f1de8ef 100644
--- a/fs/nfs/pagelist.c
+++ b/fs/nfs/pagelist.c
@@ -173,9 +173,8 @@ nfs_page_group_unlock(struct nfs_page *req)
WARN_ON_ONCE(head != head->wb_head);
- smp_mb__before_clear_bit();
- clear_bit(PG_HEADLOCK, &head->wb_flags);
- smp_mb__after_clear_bit();
+ clear_bit_unlock(PG_HEADLOCK, &head->wb_flags);
+ smp_mb__after_atomic();
wake_up_bit(&head->wb_flags, PG_HEADLOCK);
}
--
1.9.2
next reply other threads:[~2014-05-30 9:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-30 9:06 Thierry Reding [this message]
2014-05-30 11:38 ` [PATCH] NFS: Use smp_mb__{before,after}_atomic() Trond Myklebust
2014-05-30 12:18 ` Thierry Reding
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=1401440815-4227-1-git-send-email-thierry.reding@gmail.com \
--to=thierry.reding@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@primarydata.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 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).