Project

General

Profile

Actions

Bug #3094

closed

dragonfly/sys/vm/vm_page.c:1389: bed sequence of if statements ?

Added by dcb over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Kernel
Target version:
-
Start date:
10/24/2017
Due date:
% Done:

0%

Estimated time:

Description

dragonfly/sys/vm/vm_page.c:1389]: (style) Expression is always false because 'else if' condition matches previous condition at line 1384.

Source code is

if (m->valid != VM_PAGE_BITS_ALL ||
(m->flags & PG_FICTITIOUS)) {
m = NULL;
} else if (vm_page_sbusy_try(m)) {
m = NULL;
} else if (m->valid != VM_PAGE_BITS_ALL ||
(m->flags & PG_FICTITIOUS)) {
vm_page_sbusy_drop(m);
m = NULL;
Actions #1

Updated by dillon over 6 years ago

  • Status changed from New to Closed

It's actually correct, just badly organized code. The first condition has to be rechecked after the page is busied. I'll rewrite it later this week to make it more obvious.

-Matt

Actions

Also available in: Atom PDF