diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2021-07-26 13:59:20 +0200 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2021-08-09 22:57:04 +0200 |
commit | 7c0bbf2d3dcd13c906244e0c2e4a0ba3a33dab6a (patch) | |
tree | 652a4264cbde513fd6ea9f727722e8046fe134c1 /fs/nfs/pnfs.c | |
parent | NFSv4/pNFS: Fix a layoutget livelock loop (diff) | |
download | linux-7c0bbf2d3dcd13c906244e0c2e4a0ba3a33dab6a.tar.xz linux-7c0bbf2d3dcd13c906244e0c2e4a0ba3a33dab6a.zip |
NFSv4/pNFS: Remove dead code
Since commit 2b28a7bee453 ("fs, nfs: convert
pnfs_layout_hdr.plh_refcount from atomic_t to refcount_t") it has not
been legal to bump a zero refcount, so the code that tries to allow it
if the NFS_LSEG_VALID flag is still set would cause trouble. Luckily,
NFS_LSEG_VALID has its own refcount so we can never hit this bad code
snippet in practice. Remove it to avoid confusion.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs/nfs/pnfs.c')
-rw-r--r-- | fs/nfs/pnfs.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index da5cacad6979..856706180d33 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -596,10 +596,6 @@ pnfs_put_lseg(struct pnfs_layout_segment *lseg) inode = lo->plh_inode; if (refcount_dec_and_lock(&lseg->pls_refcount, &inode->i_lock)) { - if (test_bit(NFS_LSEG_VALID, &lseg->pls_flags)) { - spin_unlock(&inode->i_lock); - return; - } pnfs_get_layout_hdr(lo); pnfs_layout_remove_lseg(lo, lseg); if (pnfs_cache_lseg_for_layoutreturn(lo, lseg)) |