pnfs-obj: don't leak objio_state if ore_write/read fails
[Bug since 3.2 Kernel] CC: Stable Tree <stable@kernel.org> Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
This commit is contained in:
parent
537632e0a5
commit
9909d45a85
|
@ -454,7 +454,10 @@ int objio_read_pagelist(struct nfs_read_data *rdata)
|
|||
objios->ios->done = _read_done;
|
||||
dprintk("%s: offset=0x%llx length=0x%x\n", __func__,
|
||||
rdata->args.offset, rdata->args.count);
|
||||
return ore_read(objios->ios);
|
||||
ret = ore_read(objios->ios);
|
||||
if (unlikely(ret))
|
||||
objio_free_result(&objios->oir);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -539,8 +542,10 @@ int objio_write_pagelist(struct nfs_write_data *wdata, int how)
|
|||
dprintk("%s: offset=0x%llx length=0x%x\n", __func__,
|
||||
wdata->args.offset, wdata->args.count);
|
||||
ret = ore_write(objios->ios);
|
||||
if (unlikely(ret))
|
||||
if (unlikely(ret)) {
|
||||
objio_free_result(&objios->oir);
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (objios->sync)
|
||||
_write_done(objios->ios, objios);
|
||||
|
|
Loading…
Reference in a new issue