aboutsummaryrefslogtreecommitdiffstats
path: root/module/os/linux/zfs/zfs_acl.c
diff options
context:
space:
mode:
authorChunwei Chen <[email protected]>2022-09-16 13:36:47 -0700
committerGitHub <[email protected]>2022-09-16 13:36:47 -0700
commit768eacedef54922962562e601ca2c3366c4bcc4b (patch)
treece625415ee93fd7c03c35526e048daf7c9ddefbc /module/os/linux/zfs/zfs_acl.c
parentb24d1c77f7fc53d26ee915b5203a139f13fd9791 (diff)
zfs_enter rework
Replace ZFS_ENTER and ZFS_VERIFY_ZP, which have hidden returns, with functions that return error code. The reason we want to do this is because hidden returns are not obvious and had caused some missing fail path unwinding. This patch changes the common, linux, and freebsd parts. Also fixes fail path unwinding in zfs_fsync, zpl_fsync, zpl_xattr_{list,get,set}, and zfs_lookup(). Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Chunwei Chen <[email protected]> Closes #13831
Diffstat (limited to 'module/os/linux/zfs/zfs_acl.c')
-rw-r--r--module/os/linux/zfs/zfs_acl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/module/os/linux/zfs/zfs_acl.c b/module/os/linux/zfs/zfs_acl.c
index a139ee12c..4fd071d3c 100644
--- a/module/os/linux/zfs/zfs_acl.c
+++ b/module/os/linux/zfs/zfs_acl.c
@@ -2596,9 +2596,10 @@ zfs_fastaccesschk_execute(znode_t *zdp, cred_t *cr)
slow:
DTRACE_PROBE(zfs__fastpath__execute__access__miss);
- ZFS_ENTER(ZTOZSB(zdp));
+ if ((error = zfs_enter(ZTOZSB(zdp), FTAG)) != 0)
+ return (error);
error = zfs_zaccess(zdp, ACE_EXECUTE, 0, B_FALSE, cr);
- ZFS_EXIT(ZTOZSB(zdp));
+ zfs_exit(ZTOZSB(zdp), FTAG);
return (error);
}