]> git.proxmox.com Git - mirror_zfs.git/commit
Linux: zfs_zaccess_trivial() should always call generic_permission()
authorRichard Yao <richard.yao@klarasystems.com>
Tue, 11 Apr 2023 17:50:43 +0000 (17:50 +0000)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 20 Apr 2023 17:29:44 +0000 (10:29 -0700)
commitab71b24d20df7ec59c6b3a2b560af263ad262d9b
tree2866cbd4d435d394f403468469b063f658fc8fba
parenta10c64561648f9cb9f90959c57625d3ffdaea156
Linux: zfs_zaccess_trivial() should always call generic_permission()

Building with Clang on Linux generates a warning that err could be
uninitialized if mnt_ns is a NULL pointer. However, mnt_ns should never
be NULL, so there is no need to put this behind an if statement.  Taking
it outside of the if statement means that the possibility of err being
uninitialized goes from being always zero in a way that the compiler
could not realize to a way that is always zero in a way that the
compiler can realize.

Sponsored-By: Wasabi Technology, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Youzhong Yang <yyang@mathworks.com>
Signed-off-by: Richard Yao <richard.yao@klarasystems.com>
Closes #14738
module/os/linux/zfs/zfs_acl.c