Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7670876d authored by Al Viro's avatar Al Viro
Browse files

[PATCH] stop leaking cfq_data in cfq_set_request()



We don't need to pin ->key down; ->cfqq->cfqd will do that for us.
Incidentally, that stops the leak we had - that reference was never
dropped.

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent b0a6916b
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -1433,7 +1433,6 @@ cfq_get_io_context(struct cfq_data *cfqd, pid_t pid, gfp_t gfp_mask)
		ioc->set_ioprio = cfq_ioc_set_ioprio;
		ioc->set_ioprio = cfq_ioc_set_ioprio;
		cic->ioc = ioc;
		cic->ioc = ioc;
		cic->key = cfqd;
		cic->key = cfqd;
		atomic_inc(&cfqd->ref);
	} else {
	} else {
		struct cfq_io_context *__cic;
		struct cfq_io_context *__cic;


@@ -1469,7 +1468,6 @@ cfq_get_io_context(struct cfq_data *cfqd, pid_t pid, gfp_t gfp_mask)


		__cic->ioc = ioc;
		__cic->ioc = ioc;
		__cic->key = cfqd;
		__cic->key = cfqd;
		atomic_inc(&cfqd->ref);
		list_add(&__cic->list, &cic->list);
		list_add(&__cic->list, &cic->list);
		cic = __cic;
		cic = __cic;
	}
	}