瀏覽代碼

[PATCH] md: bio leak fix

insert a missing bio_put when writting the md superblock.

Without this we have a steady growth in the "bio" slab.

Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown 20 年之前
父節點
當前提交
f8b58edf3a
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/md/md.c

+ 1 - 0
drivers/md/md.c

@@ -338,6 +338,7 @@ static int super_written(struct bio *bio, unsigned int bytes_done, int error)
 
 	if (atomic_dec_and_test(&rdev->mddev->pending_writes))
 		wake_up(&rdev->mddev->sb_wait);
+	bio_put(bio);
 	return 0;
 }