linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ext4: error proc entry creation when the fs/ext4 is not correctly created
@ 2008-05-16  9:41 Shen Feng
  0 siblings, 0 replies; only message in thread
From: Shen Feng @ 2008-05-16  9:41 UTC (permalink / raw)
  To: linux-ext4, Theodore Tso, Andrew Morton

When the directory fs/ext4 is not correctly created under proc,
the entry under this directory should not be created.

Signed-off-by: Shen Feng <shen@cn.fujitsu.com>
---
 fs/ext4/mballoc.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index b128bdc..3c616f2 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -2639,6 +2639,10 @@ static int ext4_mb_init_per_dev_proc(struct super_block *sb)
 	struct proc_dir_entry *proc;
 	char devname[64];

+	if (proc_root_ext4 == NULL) {
+		sbi->s_mb_proc = NULL;
+		return -EINVAL;
+	}
 	bdevname(sb->s_bdev, devname);
 	sbi->s_mb_proc = proc_mkdir(devname, proc_root_ext4);

-- 
1.5.4.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2008-05-16  9:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-16  9:41 [PATCH] ext4: error proc entry creation when the fs/ext4 is not correctly created Shen Feng

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).