File tree Expand file tree Collapse file tree 1 file changed +9
-15
lines changed Expand file tree Collapse file tree 1 file changed +9
-15
lines changed Original file line number Diff line number Diff line change @@ -125,21 +125,6 @@ static void part_stat_read_all(struct block_device *part,
125125 }
126126}
127127
128- unsigned int part_in_flight (struct block_device * part )
129- {
130- unsigned int inflight = 0 ;
131- int cpu ;
132-
133- for_each_possible_cpu (cpu ) {
134- inflight += part_stat_local_read_cpu (part , in_flight [0 ], cpu ) +
135- part_stat_local_read_cpu (part , in_flight [1 ], cpu );
136- }
137- if ((int )inflight < 0 )
138- inflight = 0 ;
139-
140- return inflight ;
141- }
142-
143128static void part_in_flight_rw (struct block_device * part ,
144129 unsigned int inflight [2 ])
145130{
@@ -157,6 +142,15 @@ static void part_in_flight_rw(struct block_device *part,
157142 inflight [1 ] = 0 ;
158143}
159144
145+ unsigned int part_in_flight (struct block_device * part )
146+ {
147+ unsigned int inflight [2 ];
148+
149+ part_in_flight_rw (part , inflight );
150+
151+ return inflight [READ ] + inflight [WRITE ];
152+ }
153+
160154/*
161155 * Can be deleted altogether. Later.
162156 *
You can’t perform that action at this time.
0 commit comments