Skip to contentSkip to conversation

stable-2.02 - cov: ensure read_ahead is available

PATCH Zdenek Kabelac 1 participant 1 message Nov 8, 2019

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=f90c3d69cedf94fa094bc71cc98376d58d970223
Commit:        f90c3d69cedf94fa094bc71cc98376d58d970223
Parent:        67bdae069751e4779e738283e3d8a5873622bfc0
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Fri Nov 1 21:01:51 2019 +0100
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Fri Nov 8 13:04:45 2019 +0100

cov: ensure read_ahead is available

Make sure read_ahead pointer is not NULL when quering for RA.

---
 lib/activate/dev_manager.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
lib/activate/dev_manager.c +1 -1
index feec861..7acb3e9 100644
@@ -270,7 +270,7 @@ static int _info_run(const char *dlid, struct dm_info *dminfo,
 	    (strcmp(name_check, devname) != 0))
 		dminfo->exists = 0;	/* mismatching name -> device does not exist */
 
-	if (with_read_ahead && dminfo->exists) {
+	if (with_read_ahead && read_ahead && dminfo->exists) {
 		if (!dm_task_get_read_ahead(dmt, read_ahead))
 			goto_out;
 	} else if (read_ahead)