diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2025-06-25 14:48:50 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2025-06-29 19:03:46 -0400 |
commit | 725ab435ff6e31faca26b8234f9f04c19f772b18 (patch) | |
tree | d6c3473ea3f3271eb87c9ec768ea7edd13fbbac6 /lib/crypto/mpi/mpi-add.c | |
parent | aab771f34e63ef89e195b63d121abcb55eebfde6 (diff) |
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 <viro@zeniv.linux.org.uk>
Diffstat (limited to 'lib/crypto/mpi/mpi-add.c')
0 files changed, 0 insertions, 0 deletions