diff options
author | Peng Tao <tao.peng@primarydata.com> | 2014-12-01 03:22:23 +0300 |
---|---|---|
committer | Tom Haynes <loghyr@primarydata.com> | 2015-02-03 22:06:51 +0300 |
commit | aa8a45ee974dfe3ffe290daaf5db457afae56fde (patch) | |
tree | 10d2b6eb4a9530f2d1a3433627b401d907c3bdb7 /fs/nfs/pnfs.h | |
parent | 012fa16dca0da6c487dd066829ff0b0954925fe6 (diff) | |
download | linux-aa8a45ee974dfe3ffe290daaf5db457afae56fde.tar.xz |
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.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h index fed6ae067acb..49a466708400 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) |