From 98fad862937cddc3aeb4d527e357cd7265eae91b Mon Sep 17 00:00:00 2001 From: Tim Chase Date: Tue, 11 Feb 2014 07:34:17 -0600 Subject: [PATCH] Propagate errors when registering "relatime" property callback. Various errors can occur when registering property callbacks. As the author's comments indicate, the code is very paranoid about preserving the first-seen error when registering callbacks. This patch causes an error seen while registering the "relatime" callback to not clobber a previously-seen error. Reported-by: Jorgen Lundman Signed-off-by: Brian Behlendorf Closes #2117 --- module/zfs/zfs_vfsops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/zfs/zfs_vfsops.c b/module/zfs/zfs_vfsops.c index ec59bfbd8..a27ac694d 100644 --- a/module/zfs/zfs_vfsops.c +++ b/module/zfs/zfs_vfsops.c @@ -281,7 +281,7 @@ zfs_register_callbacks(zfs_sb_t *zsb) dsl_pool_config_enter(dmu_objset_pool(os), FTAG); error = dsl_prop_register(ds, zfs_prop_to_name(ZFS_PROP_ATIME), atime_changed_cb, zsb); - error = dsl_prop_register(ds, + error = error ? error : dsl_prop_register(ds, zfs_prop_to_name(ZFS_PROP_RELATIME), relatime_changed_cb, zsb); error = error ? error : dsl_prop_register(ds, zfs_prop_to_name(ZFS_PROP_XATTR), xattr_changed_cb, zsb);