summaryrefslogtreecommitdiffstats
path: root/fs/nfs/write.c
diff options
context:
space:
mode:
authorKinglong Mee <kinglongmee@gmail.com>2015-09-20 23:03:28 +0800
committerTrond Myklebust <trond.myklebust@primarydata.com>2015-09-20 13:46:45 -0400
commit6f29b9bba7b08c6b1d6f2cc4cf750b342fc1946c (patch)
tree456b0c4c3395ba6701298a4fa6dcbe8bc7d0ec08 /fs/nfs/write.c
parent4b0ab51db32eba0f48b7618254742f143364a28d (diff)
downloadop-kernel-dev-6f29b9bba7b08c6b1d6f2cc4cf750b342fc1946c.zip
op-kernel-dev-6f29b9bba7b08c6b1d6f2cc4cf750b342fc1946c.tar.gz
NFS: Do cleanup before resetting pageio read/write to mds
There is a reference leak of layout segment after resetting pageio read/write to mds. Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Cc: stable@vger.kernel.org # v4.0+ Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r--fs/nfs/write.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 388f480..72624dc 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -1351,6 +1351,9 @@ void nfs_pageio_reset_write_mds(struct nfs_pageio_descriptor *pgio)
{
struct nfs_pgio_mirror *mirror;
+ if (pgio->pg_ops && pgio->pg_ops->pg_cleanup)
+ pgio->pg_ops->pg_cleanup(pgio);
+
pgio->pg_ops = &nfs_pgio_rw_ops;
nfs_pageio_stop_mirroring(pgio);
OpenPOWER on IntegriCloud