[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1401440815-4227-1-git-send-email-thierry.reding@gmail.com>
Date: Fri, 30 May 2014 11:06:55 +0200
From: Thierry Reding <thierry.reding@...il.com>
To: Trond Myklebust <trond.myklebust@...marydata.com>
Cc: linux-nfs@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] NFS: Use smp_mb__{before,after}_atomic()
From: Thierry Reding <treding@...dia.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@...dia.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists