md: Return proper err if d_path error in get_bitmap_file.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From dd2c011a73a97b169e81bb6b8fc1b141a3812368 Mon Sep 17 00:00:00 2001
From: majianpeng <majianpeng@xxxxxxxxx>
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@xxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux