diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-09-20 15:07:45 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-09-28 16:03:12 -0400 |
commit | 965938b83b19aeffdc1d16ce9947c8c127e8f59b (patch) | |
tree | 40288cb09fb91d508cc7e43ce565aa9b3a2a6137 /fs/nfs/pnfs.h | |
parent | 1f7977c1368afc483908281daaffd31bca5a8d1e (diff) | |
download | linux-stable-965938b83b19aeffdc1d16ce9947c8c127e8f59b.tar.gz linux-stable-965938b83b19aeffdc1d16ce9947c8c127e8f59b.tar.bz2 linux-stable-965938b83b19aeffdc1d16ce9947c8c127e8f59b.zip |
NFSv4.1: Get rid of pNFS layout state "NFS_LAYOUT_INVALID"
In all cases where we set NFS_LAYOUT_INVALID, we also set NFS_LAYOUT_DESTROYED.
Furthermore, in all cases where we test for NFS_LAYOUT_INVALID, we should
also be testing for NFS_LAYOUT_DESTROYED, since the latter means that
we hold no valid layout segments.
Ergo the two are redundant.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/pnfs.h')
-rw-r--r-- | fs/nfs/pnfs.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h index aa9fa1b1ff4a..aacda7fbb536 100644 --- a/fs/nfs/pnfs.h +++ b/fs/nfs/pnfs.h @@ -63,7 +63,6 @@ enum { NFS_LAYOUT_BULK_RECALL, /* bulk recall affecting layout */ NFS_LAYOUT_ROC, /* some lseg had roc bit set */ NFS_LAYOUT_DESTROYED, /* no new use of layout allowed */ - NFS_LAYOUT_INVALID, /* layout is being destroyed */ NFS_LAYOUT_RETURNED, /* layout has already been returned */ }; @@ -279,6 +278,12 @@ pnfs_test_layout_returned(struct pnfs_layout_hdr *lo) return test_bit(NFS_LAYOUT_RETURNED, &lo->plh_flags); } +static inline bool +pnfs_test_layout_destroyed(struct pnfs_layout_hdr *lo) +{ + return test_bit(NFS_LAYOUT_DESTROYED, &lo->plh_flags); +} + static inline struct pnfs_layout_segment * pnfs_get_lseg(struct pnfs_layout_segment *lseg) { |