Commit 985eeae9 authored by NeilBrown's avatar NeilBrown Committed by Chuck Lever

nfsd: use clear_and_wake_up_bit()

nfsd has two places that open-code clear_and_wake_up_bit().  One has
the required memory barriers.  The other does not.

Change both to use clear_and_wake_up_bit() so we have the barriers
without the noise.
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent aeddf8e6
...@@ -1895,10 +1895,7 @@ nfsd4_cltrack_upcall_lock(struct nfs4_client *clp) ...@@ -1895,10 +1895,7 @@ nfsd4_cltrack_upcall_lock(struct nfs4_client *clp)
static void static void
nfsd4_cltrack_upcall_unlock(struct nfs4_client *clp) nfsd4_cltrack_upcall_unlock(struct nfs4_client *clp)
{ {
smp_mb__before_atomic(); clear_and_wake_up_bit(NFSD4_CLIENT_UPCALL_LOCK, &clp->cl_flags);
clear_bit(NFSD4_CLIENT_UPCALL_LOCK, &clp->cl_flags);
smp_mb__after_atomic();
wake_up_bit(&clp->cl_flags, NFSD4_CLIENT_UPCALL_LOCK);
} }
static void static void
......
...@@ -3079,8 +3079,7 @@ nfsd4_cb_getattr_release(struct nfsd4_callback *cb) ...@@ -3079,8 +3079,7 @@ nfsd4_cb_getattr_release(struct nfsd4_callback *cb)
struct nfs4_delegation *dp = struct nfs4_delegation *dp =
container_of(ncf, struct nfs4_delegation, dl_cb_fattr); container_of(ncf, struct nfs4_delegation, dl_cb_fattr);
clear_bit(CB_GETATTR_BUSY, &ncf->ncf_cb_flags); clear_and_wake_up_bit(CB_GETATTR_BUSY, &ncf->ncf_cb_flags);
wake_up_bit(&ncf->ncf_cb_flags, CB_GETATTR_BUSY);
nfs4_put_stid(&dp->dl_stid); nfs4_put_stid(&dp->dl_stid);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment