Commit 3c90d8b
committed
udmabuf: udmabuf_create pin folio codestyle cleanup
JIRA: https://issues.redhat.com/browse/RHEL-89519
Conflicts:
A merge conflict in a udmabuf_create() hunk due to the presence of
a later upstream commit f49856f ("udmabuf: fix memory leak on
last export_udmabuf() error path").
commit 164fd9e
Author: Huan Yang <link@vivo.com>
Date: Wed, 18 Sep 2024 10:52:27 +0800
udmabuf: udmabuf_create pin folio codestyle cleanup
This patch aim to simplify the memfd folio pin during the udmabuf
create. No functional changes.
This patch create a udmabuf_pin_folios function, in this, do the memfd
pin folio and then record each pinned folio, offset.
This patch simplify the pinned folio record, iter by each pinned folio,
and then record each offset in it.
Compare to iter by pgcnt, more readable.
Suggested-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Signed-off-by: Huan Yang <link@vivo.com>
Acked-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240918025238.2957823-5-link@vivo.com
Signed-off-by: Waiman Long <longman@redhat.com>1 parent 100c8a5 commit 3c90d8b
1 file changed
+76
-61
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
291 | 291 | | |
292 | 292 | | |
293 | 293 | | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | 294 | | |
298 | 295 | | |
299 | 296 | | |
| |||
322 | 319 | | |
323 | 320 | | |
324 | 321 | | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
325 | 376 | | |
326 | 377 | | |
327 | 378 | | |
328 | 379 | | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
| 380 | + | |
333 | 381 | | |
334 | 382 | | |
335 | | - | |
336 | | - | |
| 383 | + | |
| 384 | + | |
337 | 385 | | |
338 | 386 | | |
339 | 387 | | |
| |||
342 | 390 | | |
343 | 391 | | |
344 | 392 | | |
345 | | - | |
| 393 | + | |
346 | 394 | | |
347 | | - | |
| 395 | + | |
348 | 396 | | |
349 | | - | |
350 | | - | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
351 | 400 | | |
352 | 401 | | |
353 | 402 | | |
354 | | - | |
| 403 | + | |
355 | 404 | | |
356 | 405 | | |
357 | | - | |
358 | | - | |
| 406 | + | |
359 | 407 | | |
360 | 408 | | |
361 | 409 | | |
362 | 410 | | |
363 | | - | |
364 | | - | |
| 411 | + | |
| 412 | + | |
365 | 413 | | |
366 | 414 | | |
367 | 415 | | |
368 | 416 | | |
369 | 417 | | |
370 | | - | |
371 | 418 | | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
| 419 | + | |
376 | 420 | | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
| 421 | + | |
| 422 | + | |
381 | 423 | | |
382 | 424 | | |
383 | 425 | | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
391 | 429 | | |
392 | 430 | | |
393 | 431 | | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
| 432 | + | |
| 433 | + | |
418 | 434 | | |
419 | | - | |
| 435 | + | |
| 436 | + | |
420 | 437 | | |
421 | 438 | | |
422 | 439 | | |
| |||
438 | 455 | | |
439 | 456 | | |
440 | 457 | | |
441 | | - | |
442 | | - | |
443 | 458 | | |
444 | 459 | | |
445 | 460 | | |
| |||
0 commit comments