diff options
| author | 2013-01-25 21:25:02 -0800 | |
|---|---|---|
| committer | 2013-01-25 21:25:02 -0800 | |
| commit | 8f5f90a872c38b4e78f3cc95e8a25434b98e4db2 (patch) | |
| tree | 36c50b0c97286ab89c85016f7ab281f8e843c05c /fs/nfs/read.c | |
| parent | staging: comedi: addi_watchdog: all i/o registers are 32-bit (diff) | |
| parent | Linux 3.8-rc5 (diff) | |
| download | linux-dev-8f5f90a872c38b4e78f3cc95e8a25434b98e4db2.tar.xz linux-dev-8f5f90a872c38b4e78f3cc95e8a25434b98e4db2.zip | |
Merge 3.8-rc5 into staging-next
This resolves a merge issue with a iio driver, and the zram code.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/nfs/read.c')
| -rw-r--r-- | fs/nfs/read.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/nfs/read.c b/fs/nfs/read.c index b6bdb18e892c..a5e5d9899d56 100644 --- a/fs/nfs/read.c +++ b/fs/nfs/read.c @@ -91,12 +91,16 @@ void nfs_readdata_release(struct nfs_read_data *rdata) put_nfs_open_context(rdata->args.context); if (rdata->pages.pagevec != rdata->pages.page_array) kfree(rdata->pages.pagevec); - if (rdata != &read_header->rpc_data) - kfree(rdata); - else + if (rdata == &read_header->rpc_data) { rdata->header = NULL; + rdata = NULL; + } if (atomic_dec_and_test(&hdr->refcnt)) hdr->completion_ops->completion(hdr); + /* Note: we only free the rpc_task after callbacks are done. + * See the comment in rpc_free_task() for why + */ + kfree(rdata); } EXPORT_SYMBOL_GPL(nfs_readdata_release); |
