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>
{
if (!list_empty(&desc->pg_list)) {
int error = desc->pg_doio(desc);
- desc->pg_lseg = NULL;
if (error < 0)
desc->pg_error = error;
else
nbytes -= rsize;
} while (nbytes != 0);
put_lseg(lseg);
+ desc->pg_lseg = NULL;
return ret;
0, lseg);
out:
put_lseg(lseg);
+ desc->pg_lseg = NULL;
return ret;
}
} while (nbytes != 0);
put_lseg(lseg);
+ desc->pg_lseg = NULL;
return ret;
out_bad:
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;
}