[PATCH 20/20] block, bfq: remove unncessary process_ref check for merged queue in bfq_setup_merge

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

 



As we already check process_refs of original new_bfqq is not zero. The
later new_bfqq maybe the merged queue of original new_bfqq which inherit
the process_refs of original new_bfqq which is not zero, so process_refs
of merged queue will not be zero.
Remove unncessary check for merged queue and remove new_process_refs
which will not be used.

Signed-off-by: Kemeng Shi <shikemeng@xxxxxxxxxx>
---
 block/bfq-iosched.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index 589ab59abcf5..0736577bfbfe 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -2740,7 +2740,7 @@ static struct bfq_queue *bfq_find_close_cooperator(struct bfq_data *bfqd,
 static struct bfq_queue *
 bfq_setup_merge(struct bfq_queue *bfqq, struct bfq_queue *new_bfqq)
 {
-	int process_refs, new_process_refs;
+	int process_refs;
 
 	/*
 	 * If there are no process references on the new_bfqq, then it is
@@ -2758,12 +2758,11 @@ bfq_setup_merge(struct bfq_queue *bfqq, struct bfq_queue *new_bfqq)
 	}
 
 	process_refs = bfqq_process_refs(bfqq);
-	new_process_refs = bfqq_process_refs(new_bfqq);
 	/*
 	 * If the process for the bfqq has gone away, there is no
 	 * sense in merging the queues.
 	 */
-	if (process_refs == 0 || new_process_refs == 0)
+	if (process_refs == 0)
 		return NULL;
 
 	/*
-- 
2.30.0




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux