* md: Return proper err if d_path error in get_bitmap_file.
@ 2012-02-29 1:47 majianpeng
0 siblings, 0 replies; only message in thread
From: majianpeng @ 2012-02-29 1:47 UTC (permalink / raw)
To: Neil Brown; +Cc: linux-raid
From dd2c011a73a97b169e81bb6b8fc1b141a3812368 Mon Sep 17 00:00:00 2001
From: majianpeng <majianpeng@gmail.com>
Date: Wed, 29 Feb 2012 09:32:29 +0800
Subject: [PATCH] md: Return proper err if d_path error in get_bitmap_file.
Signed-off-by: majianpeng <majianpeng@gmail.com>
---
drivers/md/md.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/md/md.c b/drivers/md/md.c
index ce88755..f2085ee 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -5427,8 +5427,10 @@ static int get_bitmap_file(struct mddev * mddev, void __user * arg)
goto out;
ptr = d_path(&mddev->bitmap->file->f_path, buf, sizeof(file->pathname));
- if (IS_ERR(ptr))
+ if (IS_ERR(ptr)) {
+ err = PTR_ERR(ptr);
goto out;
+ }
strcpy(file->pathname, ptr);
--
1.7.5.4
--------------
majianpeng
2012-02-29
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-02-29 1:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-29 1:47 md: Return proper err if d_path error in get_bitmap_file majianpeng
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).