grab_requested_mnt_ns was changed to return error codes on failure, but its callers were not updated to check for error pointers, still checking only for a NULL return value. This commit updates the callers to use IS_ERR() or IS_ERR_OR_NULL() and PTR_ERR() to correctly check for and propagate errors. This also makes sure that the logic actually works and mount namespace file descriptors can be used to refere to mounts. Christian Brauner <brauner@kernel.org> says: Rework the patch to be more ergonomic and in line with our overall error handling patterns.
Showing the changes to include/uapi (1 of 2 files). Show all
Unified · Split
| @@ -197,7 +197,7 @@ struct statmount { · 196 unmodified lines | ||
| 197 | 197 | */ |
| 198 | 198 | struct mnt_id_req { |
| 199 | 199 | __u32 size; |
| 200 | − __u32 spare; | |
| 200 | + __u32 mnt_ns_fd; | |
| 201 | 201 | __u64 mnt_id; |
| 202 | 202 | __u64 param; |
| 203 | 203 | __u64 mnt_ns_id; |