The patch titled
     hfsplus: add missing call to bio_put()
has been added to the -mm tree.  Its filename is
     hfsplus-add-missing-call-to-bio_put.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: hfsplus: add missing call to bio_put()
From: Seth Forshee <[email protected]>

hfsplus leaks bio objects by failing to call bio_put() on the bios it
allocates.  Add the missing call to fix the leak.

Signed-off-by: Seth Forshee <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: <[email protected]>         [2.6.38+]
Signed-off-by: Andrew Morton <[email protected]>
---

 fs/hfsplus/wrapper.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff -puN fs/hfsplus/wrapper.c~hfsplus-add-missing-call-to-bio_put 
fs/hfsplus/wrapper.c
--- a/fs/hfsplus/wrapper.c~hfsplus-add-missing-call-to-bio_put
+++ a/fs/hfsplus/wrapper.c
@@ -36,6 +36,7 @@ int hfsplus_submit_bio(struct block_devi
 {
        DECLARE_COMPLETION_ONSTACK(wait);
        struct bio *bio;
+       int ret = 0;
 
        bio = bio_alloc(GFP_NOIO, 1);
        bio->bi_sector = sector;
@@ -54,8 +55,10 @@ int hfsplus_submit_bio(struct block_devi
        wait_for_completion(&wait);
 
        if (!bio_flagged(bio, BIO_UPTODATE))
-               return -EIO;
-       return 0;
+               ret = -EIO;
+
+       bio_put(bio);
+       return ret;
 }
 
 static int hfsplus_read_mdb(void *bufptr, struct hfsplus_wd *wd)
_

Patches currently in -mm which might be from [email protected] are

hfsplus-add-missing-call-to-bio_put.patch

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to