summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorFred Isaman <iisaman@netapp.com>2011-03-03 15:13:49 +0000
committerTrond Myklebust <Trond.Myklebust@netapp.com>2011-03-11 15:38:45 -0500
commit36fe432d33e078caee5c954e15e929819c2cacae (patch)
tree84bccc3434a423f8eabae42d543fad5914124ae2 /fs/nfs
parentc76069bda0f17cd3e153e54d9ac01242909c6b15 (diff)
downloadop-kernel-dev-36fe432d33e078caee5c954e15e929819c2cacae.zip
op-kernel-dev-36fe432d33e078caee5c954e15e929819c2cacae.tar.gz
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>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/pagelist.c1
-rw-r--r--fs/nfs/read.c2
-rw-r--r--fs/nfs/write.c2
3 files changed, 4 insertions, 1 deletions
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c
index 9f62874..23e7944 100644
--- a/fs/nfs/pagelist.c
+++ b/fs/nfs/pagelist.c
@@ -312,7 +312,6 @@ static void nfs_pageio_doio(struct nfs_pageio_descriptor *desc)
{
if (!list_empty(&desc->pg_list)) {
int error = desc->pg_doio(desc);
- desc->pg_lseg = NULL;
if (error < 0)
desc->pg_error = error;
else
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 @@ static int nfs_pagein_multi(struct nfs_pageio_descriptor *desc)
nbytes -= rsize;
} while (nbytes != 0);
put_lseg(lseg);
+ desc->pg_lseg = NULL;
return ret;
@@ -357,6 +358,7 @@ static int nfs_pagein_one(struct nfs_pageio_descriptor *desc)
0, lseg);
out:
put_lseg(lseg);
+ desc->pg_lseg = NULL;
return ret;
}
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index b74200a..47a3ad6 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -949,6 +949,7 @@ static int nfs_flush_multi(struct nfs_pageio_descriptor *desc)
} while (nbytes != 0);
put_lseg(lseg);
+ desc->pg_lseg = NULL;
return ret;
out_bad:
@@ -1005,6 +1006,7 @@ static int nfs_flush_one(struct nfs_pageio_descriptor *desc)
ret = nfs_write_rpcsetup(req, data, &nfs_write_full_ops, desc->pg_count, 0, lseg, desc->pg_ioflags);
out:
put_lseg(lseg); /* Cleans any gotten in ->pg_test */
+ desc->pg_lseg = NULL;
return ret;
}
OpenPOWER on IntegriCloud