Repository navigation
Commit 8b19e34
committed
vfs: make getcwd() get the root and pwd path under rcu
This allows us to skip all the crazy spinlocks and reference count
updates, and instead use the fs sequence read-lock to get an atomic
snapshot of the root and cwd information.
We might want to make the rule that "prepend_path()" is always called
with the RCU lock held, but the RCU lock nests fine and this is the
minimal fix.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>1 parent 5762482 commit 8b19e34
1 file changed
Lines changed: 12 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3015 | 3015 | | |
3016 | 3016 | | |
3017 | 3017 | | |
3018 | | - | |
3019 | | - | |
| 3018 | + | |
| 3019 | + | |
3020 | 3020 | | |
3021 | | - | |
3022 | | - | |
3023 | | - | |
3024 | | - | |
3025 | | - | |
3026 | | - | |
| 3021 | + | |
| 3022 | + | |
| 3023 | + | |
| 3024 | + | |
| 3025 | + | |
| 3026 | + | |
| 3027 | + | |
3027 | 3028 | | |
3028 | 3029 | | |
3029 | 3030 | | |
| |||
3053 | 3054 | | |
3054 | 3055 | | |
3055 | 3056 | | |
3056 | | - | |
| 3057 | + | |
| 3058 | + | |
3057 | 3059 | | |
3058 | 3060 | | |
3059 | 3061 | | |
| |||
3088 | 3090 | | |
3089 | 3091 | | |
3090 | 3092 | | |
3091 | | - | |
3092 | | - | |
| 3093 | + | |
3093 | 3094 | | |
3094 | 3095 | | |
3095 | 3096 | | |
| |||
0 commit comments