diff options
author | Peng Tao <tao.peng@primarydata.com> | 2014-12-01 08:22:23 +0800 |
---|---|---|
committer | Tom Haynes <loghyr@primarydata.com> | 2015-02-03 11:06:51 -0800 |
commit | aa8a45ee974dfe3ffe290daaf5db457afae56fde (patch) | |
tree | 10d2b6eb4a9530f2d1a3433627b401d907c3bdb7 /fs/nfs/nfs4proc.c | |
parent | 012fa16dca0da6c487dd066829ff0b0954925fe6 (diff) | |
download | talos-op-linux-aa8a45ee974dfe3ffe290daaf5db457afae56fde.tar.gz talos-op-linux-aa8a45ee974dfe3ffe290daaf5db457afae56fde.zip |
nfs41: wait for LAYOUTRETURN before retrying LAYOUTGET
Also take care to stop waiting if someone clears retry bit.
Signed-off-by: Peng Tao <tao.peng@primarydata.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 7e1a97a54f99..44c600aac907 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -7796,7 +7796,9 @@ static void nfs4_layoutreturn_release(void *calldata) spin_lock(&lo->plh_inode->i_lock); if (lrp->res.lrs_present) pnfs_set_layout_stateid(lo, &lrp->res.stateid, true); - clear_bit(NFS_LAYOUT_RETURN, &lo->plh_flags); + clear_bit_unlock(NFS_LAYOUT_RETURN, &lo->plh_flags); + smp_mb__after_atomic(); + wake_up_bit(&lo->plh_flags, NFS_LAYOUT_RETURN); clear_bit(NFS_LAYOUT_RETURN_BEFORE_CLOSE, &lo->plh_flags); rpc_wake_up(&NFS_SERVER(lo->plh_inode)->roc_rpcwaitq); lo->plh_block_lgets--; |