NFS: Fix a double page unlock

Since commit 0bcbf039f6, nfs_readpage_release() has been used to
unlock the page in the read code.

Fixes: 0bcbf039f6 ("nfs: handle request add failure properly")
Cc: stable@vger.kernel.org # v4.5+
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
Trond Myklebust 2016-06-17 16:48:25 -04:00 committed by Anna Schumaker
parent 5e3a98883e
commit cbebaf897e

View File

@ -367,13 +367,13 @@ readpage_async_filler(void *data, struct page *page)
nfs_list_remove_request(new);
nfs_readpage_release(new);
error = desc->pgio->pg_error;
goto out_unlock;
goto out;
}
return 0;
out_error:
error = PTR_ERR(new);
out_unlock:
unlock_page(page);
out:
return error;
}