Skip to content

Commit 98fad86

Browse files
dweeezilbehlendorf
authored andcommitted
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 <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #2117
1 parent 99d3ece commit 98fad86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

module/zfs/zfs_vfsops.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ zfs_register_callbacks(zfs_sb_t *zsb)
281281
dsl_pool_config_enter(dmu_objset_pool(os), FTAG);
282282
error = dsl_prop_register(ds,
283283
zfs_prop_to_name(ZFS_PROP_ATIME), atime_changed_cb, zsb);
284-
error = dsl_prop_register(ds,
284+
error = error ? error : dsl_prop_register(ds,
285285
zfs_prop_to_name(ZFS_PROP_RELATIME), relatime_changed_cb, zsb);
286286
error = error ? error : dsl_prop_register(ds,
287287
zfs_prop_to_name(ZFS_PROP_XATTR), xattr_changed_cb, zsb);

0 commit comments

Comments
 (0)