diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2009-06-11 08:24:13 -0400 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2009-06-11 12:04:18 -0400 |
commit | 2e1483c995bbd0fa6cbd055ad76088a520799ba4 (patch) | |
tree | 4b555ae3452a80e3cebd7adcab83b019d1ca1b60 /fs/block_dev.c | |
parent | 4f2294b6dc88d99295230d97fef2c9863cec44c3 (diff) |
kmemleak: Remove some of the kmemleak false positives
There are allocations for which the main pointer cannot be found but
they are not memory leaks. This patch fixes some of them. For more
information on false positives, see Documentation/kmemleak.txt.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r-- | fs/block_dev.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c index f45dbc18dd17..d250f807fd83 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/uio.h> | 25 | #include <linux/uio.h> |
26 | #include <linux/namei.h> | 26 | #include <linux/namei.h> |
27 | #include <linux/log2.h> | 27 | #include <linux/log2.h> |
28 | #include <linux/kmemleak.h> | ||
28 | #include <asm/uaccess.h> | 29 | #include <asm/uaccess.h> |
29 | #include "internal.h" | 30 | #include "internal.h" |
30 | 31 | ||
@@ -492,6 +493,11 @@ void __init bdev_cache_init(void) | |||
492 | bd_mnt = kern_mount(&bd_type); | 493 | bd_mnt = kern_mount(&bd_type); |
493 | if (IS_ERR(bd_mnt)) | 494 | if (IS_ERR(bd_mnt)) |
494 | panic("Cannot create bdev pseudo-fs"); | 495 | panic("Cannot create bdev pseudo-fs"); |
496 | /* | ||
497 | * This vfsmount structure is only used to obtain the | ||
498 | * blockdev_superblock, so tell kmemleak not to report it. | ||
499 | */ | ||
500 | kmemleak_not_leak(bd_mnt); | ||
495 | blockdev_superblock = bd_mnt->mnt_sb; /* For writeback */ | 501 | blockdev_superblock = bd_mnt->mnt_sb; /* For writeback */ |
496 | } | 502 | } |
497 | 503 | ||