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 <lundman@lundman.net>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #2117
This commit is contained in:
Tim Chase 2014-02-11 07:34:17 -06:00 committed by Brian Behlendorf
parent 99d3ece847
commit 98fad86293
1 changed files with 1 additions and 1 deletions

View File

@ -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);