Commit 4ae404a
Miklos Szeredi
fuse: clean up device cloning
- fuse_mutex is not needed for device cloning, because fuse_dev_install()
uses cmpxcg() to set fud->fc, which prevents races between clone/mount
or clone/clone. This makes the logic simpler
- Drop fc->dev_count. This is only used to check in release if the device
is the last clone, but checking list_empty(&fc->devices) is equivalent
after removing the released device from the list. Removing the fuse_dev
before calling fuse_abort_conn() is okay, since the processing and io
lists are now empty for this device.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>1 parent d42eb23 commit 4ae404a
3 files changed
Lines changed: 15 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2547 | 2547 | | |
2548 | 2548 | | |
2549 | 2549 | | |
| 2550 | + | |
2550 | 2551 | | |
2551 | 2552 | | |
2552 | 2553 | | |
| |||
2556 | 2557 | | |
2557 | 2558 | | |
2558 | 2559 | | |
| 2560 | + | |
| 2561 | + | |
2559 | 2562 | | |
2560 | | - | |
| 2563 | + | |
| 2564 | + | |
| 2565 | + | |
| 2566 | + | |
2561 | 2567 | | |
2562 | 2568 | | |
2563 | 2569 | | |
2564 | | - | |
2565 | | - | |
2566 | | - | |
2567 | 2570 | | |
2568 | 2571 | | |
2569 | 2572 | | |
| |||
2582 | 2585 | | |
2583 | 2586 | | |
2584 | 2587 | | |
2585 | | - | |
2586 | | - | |
2587 | | - | |
2588 | | - | |
2589 | | - | |
2590 | | - | |
2591 | | - | |
2592 | | - | |
2593 | | - | |
2594 | | - | |
2595 | | - | |
2596 | | - | |
2597 | | - | |
2598 | 2588 | | |
2599 | 2589 | | |
2600 | 2590 | | |
2601 | | - | |
| 2591 | + | |
2602 | 2592 | | |
2603 | 2593 | | |
2604 | 2594 | | |
| |||
2618 | 2608 | | |
2619 | 2609 | | |
2620 | 2610 | | |
2621 | | - | |
2622 | | - | |
| 2611 | + | |
| 2612 | + | |
| 2613 | + | |
| 2614 | + | |
| 2615 | + | |
| 2616 | + | |
| 2617 | + | |
2623 | 2618 | | |
2624 | 2619 | | |
2625 | 2620 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
650 | 650 | | |
651 | 651 | | |
652 | 652 | | |
653 | | - | |
654 | | - | |
655 | | - | |
656 | 653 | | |
657 | 654 | | |
658 | 655 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1001 | 1001 | | |
1002 | 1002 | | |
1003 | 1003 | | |
1004 | | - | |
1005 | 1004 | | |
1006 | 1005 | | |
1007 | 1006 | | |
| |||
0 commit comments