NFS/pNFS: Don't call pnfs_free_bucket_lseg() before removing the request
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Wed, 6 Jan 2021 16:28:30 +0000 (11:28 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Jan 2021 17:27:31 +0000 (18:27 +0100)
commit067aefcdfc1e50662b9ac80d3662c4fff3075313
tree9b5f291226bb84f5eb3a238a44b3e8d0e68e3c75
parente6ae16467af19d2572a48af59946223bd089a06e
NFS/pNFS: Don't call pnfs_free_bucket_lseg() before removing the request

commit 1757655d780d9d29bc4b60e708342e94924f7ef3 upstream.

In pnfs_generic_clear_request_commit(), we try calling
pnfs_free_bucket_lseg() before we remove the request from the DS bucket.
That will always fail, since the point is to test for whether or not
that bucket is empty.

Fixes: c84bea59449a ("NFS/pNFS: Simplify bucket layout segment reference counting")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/pnfs_nfs.c