NFSv4.1: Clear lseg pointer in ->doio function
Now that we have access to the pointer, clear it immediately after
the put, instead of in caller.
Signed-off-by: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
diff --git a/fs/nfs/read.c b/fs/nfs/read.c
index ab9c776..4b764c6 100644
--- a/fs/nfs/read.c
+++ b/fs/nfs/read.c
@@ -311,6 +311,7 @@
nbytes -= rsize;
} while (nbytes != 0);
put_lseg(lseg);
+ desc->pg_lseg = NULL;
return ret;
@@ -357,6 +358,7 @@
0, lseg);
out:
put_lseg(lseg);
+ desc->pg_lseg = NULL;
return ret;
}