summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorBoaz Harrosh <bharrosh@panasas.com>2009-06-08 18:28:41 +0200
committerBoaz Harrosh <bharrosh@panasas.com>2009-06-21 16:53:44 +0200
commitb76a3f93d01fc93a87cb6eba4e854ffe378b4bac (patch)
tree528b1a401be9b188cebf59850c2215d7260929aa /fs
parentmm: page_alloc: clear PG_locked before checking flags on free (diff)
downloadlinux-b76a3f93d01fc93a87cb6eba4e854ffe378b4bac.tar.xz
linux-b76a3f93d01fc93a87cb6eba4e854ffe378b4bac.zip
exofs: Fix bio leak in error handling path (sync read)
When failing a read request in the sync path, called from write_begin, I forgot to free the allocated bio, fix it. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/exofs/inode.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c
index 77d0a295eb1c..bb5d6ed0f7a8 100644
--- a/fs/exofs/inode.c
+++ b/fs/exofs/inode.c
@@ -295,6 +295,9 @@ static int read_exec(struct page_collect *pcol, bool is_sync)
err:
if (!is_sync)
_unlock_pcol_pages(pcol, ret, READ);
+ else /* Pages unlocked by caller in sync mode only free bio */
+ pcol_free(pcol);
+
kfree(pcol_copy);
if (or)
osd_end_request(or);