diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2017-10-31 16:27:29 -0500 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2017-10-31 17:23:12 -0500 |
commit | 3edf652fa16562fb57a5a4b996ba72e2d7cdc38b (patch) | |
tree | e4eeee3cab3552207c36eac2ff9ae94f5e1b6134 /lib | |
parent | 11a8b9270e16e36d5fb607ba4b60db2958b7c625 (diff) | |
download | linux-3edf652fa16562fb57a5a4b996ba72e2d7cdc38b.tar.bz2 |
userns: Simplify the user and group mapping functions
Consolidate reading the number of extents and computing the return
value in the map_id_down, map_id_range_down and map_id_range.
This removal of one read of extents makes one smp_rmb unnecessary
and makes the code safe it is executed during the map write. Reading
the number of extents twice and depending on the result being the same
is not safe, as it could be 0 the first time and > 5 the second time,
which would lead to misinterpreting the union fields.
The consolidation of the return value just removes a duplicate
caluculation which should make it easier to understand and maintain
the code.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions