summaryrefslogtreecommitdiffstats
path: root/fs/nfs/pnfs.h
diff options
context:
space:
mode:
authorPeng Tao <tao.peng@primarydata.com>2014-12-01 08:22:23 +0800
committerTom Haynes <loghyr@primarydata.com>2015-02-03 11:06:51 -0800
commitaa8a45ee974dfe3ffe290daaf5db457afae56fde (patch)
tree10d2b6eb4a9530f2d1a3433627b401d907c3bdb7 /fs/nfs/pnfs.h
parent012fa16dca0da6c487dd066829ff0b0954925fe6 (diff)
downloadop-kernel-dev-aa8a45ee974dfe3ffe290daaf5db457afae56fde.zip
op-kernel-dev-aa8a45ee974dfe3ffe290daaf5db457afae56fde.tar.gz
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/pnfs.h')
-rw-r--r--fs/nfs/pnfs.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index fed6ae0..49a4667 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -359,8 +359,11 @@ static inline void pnfs_set_retry_layoutget(struct pnfs_layout_hdr *lo)
static inline void pnfs_clear_retry_layoutget(struct pnfs_layout_hdr *lo)
{
- if (test_and_clear_bit(NFS_LAYOUT_RETRY_LAYOUTGET, &lo->plh_flags))
+ if (test_and_clear_bit(NFS_LAYOUT_RETRY_LAYOUTGET, &lo->plh_flags)) {
atomic_dec(&lo->plh_refcount);
+ /* wake up waiters for LAYOUTRETURN as that is not needed */
+ wake_up_bit(&lo->plh_flags, NFS_LAYOUT_RETURN);
+ }
}
static inline bool pnfs_should_retry_layoutget(struct pnfs_layout_hdr *lo)
OpenPOWER on IntegriCloud