[PATCH 1/3] dmraid: set read_info to @offset by default in read_raid_dev()

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

 



read_info is passed from optional f_read_metatdata() to f_setup_rd().
If f_read_metadata() doesn't exist or doesn't initialize it, read_info
contains garbage.  Initialize it to @offset by default.

Signed-off-by: Tejun Heo <tj@xxxxxxxxxx>
---
 lib/format/format.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/format/format.c b/lib/format/format.c
index 88cb938..4a2594a 100644
--- a/lib/format/format.c
+++ b/lib/format/format.c
@@ -435,7 +435,7 @@ read_raid_dev(struct lib_context *lc,
 {
 	struct raid_dev *rd = NULL;
 	void *meta;
-	union read_info info;
+	union read_info info = { .u64 = offset };
 
 	/*
 	 * In case the metadata format handler provides a special
-- 
1.6.0.2

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux