linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Boaz Harrosh <bharrosh@panasas.com>
To: Jeff Garzik <jeff@garzik.org>, open-osd <osd-dev@open-osd.org>
Cc: linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH 1/6] exofs: Fix bio leak in error handling path (sync read)
Date: Wed, 17 Jun 2009 19:03:58 +0300	[thread overview]
Message-ID: <1245254638-8595-1-git-send-email-bharrosh@panasas.com> (raw)
In-Reply-To: <4A391373.3050301@panasas.com>

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>
---
 fs/exofs/inode.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c
index 77d0a29..bb5d6ed 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);
-- 
1.6.2.1


  reply	other threads:[~2009-06-17 16:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-17 16:01 [PATCHSET 0/6] exofs: few patches for Linux 2.6.31 Boaz Harrosh
2009-06-17 16:03 ` Boaz Harrosh [this message]
2009-06-17 16:04 ` [PATCH 2/6] exofs: Remove IBM copyrights Boaz Harrosh
2009-06-17 16:05 ` [PATCH 3/6] exofs: Avoid using file_fsync() Boaz Harrosh
2009-06-17 16:06 ` [PATCH 4/6] MAINTAINERS: Add osd maintained files (F:) Boaz Harrosh
2009-06-17 16:07 ` [PATCH 5/6] osdblk: a Linux block device for OSD objects Boaz Harrosh
2009-06-17 16:07 ` [PATCH 6/6] osdblk: Adjust queue limits to lower device's limits Boaz Harrosh
2009-06-18 12:46 ` [osd-dev] [PATCHSET 0/6] exofs: few patches for Linux 2.6.31 Boaz Harrosh
2009-06-18 12:55   ` [PATCH] open-osd: osdblk User Mode utility Boaz Harrosh
2009-06-22 12:15     ` [osd-dev] " Boaz Harrosh
2009-06-18 15:31   ` [osd-dev] [PATCHSET 0/6] exofs: few patches for Linux 2.6.31 Jeff Garzik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1245254638-8595-1-git-send-email-bharrosh@panasas.com \
    --to=bharrosh@panasas.com \
    --cc=jeff@garzik.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=osd-dev@open-osd.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).