diff options
| author | Al Viro <[email protected]> | 2025-06-25 18:48:50 +0000 |
|---|---|---|
| committer | Al Viro <[email protected]> | 2025-06-29 23:03:46 +0000 |
| commit | 725ab435ff6e31faca26b8234f9f04c19f772b18 (patch) | |
| tree | d6c3473ea3f3271eb87c9ec768ea7edd13fbbac6 /drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | |
| parent | take freeing of emptied mnt_namespace to namespace_unlock() (diff) | |
| download | kernel-725ab435ff6e31faca26b8234f9f04c19f772b18.tar.gz kernel-725ab435ff6e31faca26b8234f9f04c19f772b18.zip | |
get rid of CL_SHARE_TO_SLAVE
the only difference between it and CL_SLAVE is in this predicate
in clone_mnt():
if ((flag & CL_SLAVE) ||
((flag & CL_SHARED_TO_SLAVE) && IS_MNT_SHARED(old))) {
However, in case of CL_SHARED_TO_SLAVE we have not allocated any
mount group ids since the time we'd grabbed namespace_sem, so
IS_MNT_SHARED() is equivalent to non-zero ->mnt_group_id. And
in case of CL_SLAVE old has come either from the original tree,
which had ->mnt_group_id allocated for all nodes or from result
of sequence of CL_MAKE_SHARED or CL_MAKE_SHARED|CL_SLAVE copies,
ultimately going back to the original tree. In both cases we are
guaranteed that old->mnt_group_id will be non-zero.
In other words, the predicate is always equal to
(flags & (CL_SLAVE | CL_SHARED_TO_SLAVE)) && old->mnt_group_id
and with that replacement CL_SLAVE and CL_SHARED_TO_SLAVE have exact
same behaviour.
Signed-off-by: Al Viro <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c')
0 files changed, 0 insertions, 0 deletions
