summaryrefslogtreecommitdiffstats
path: root/module/zfs/dsl_dir.c
diff options
context:
space:
mode:
authorBoris Protopopov <[email protected]>2014-11-19 12:08:08 -0500
committerBrian Behlendorf <[email protected]>2014-12-19 10:51:24 -0800
commit9063f65476b7b7d78ccf096fec890b8727117e2a (patch)
treee3e8499294f623031677a725fadb6d8eb9f6fb79 /module/zfs/dsl_dir.c
parentc0ba93dee6cb62ccbb2c9b3103f15ddbf4680d6e (diff)
Correct error returns to unify cross-pool operation error handling
Signed-off-by: Boris Protopopov <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #2911
Diffstat (limited to 'module/zfs/dsl_dir.c')
-rw-r--r--module/zfs/dsl_dir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/zfs/dsl_dir.c b/module/zfs/dsl_dir.c
index 7eafdfd2e..4cbe04e2d 100644
--- a/module/zfs/dsl_dir.c
+++ b/module/zfs/dsl_dir.c
@@ -321,7 +321,7 @@ dsl_dir_hold(dsl_pool_t *dp, const char *name, void *tag,
/* Make sure the name is in the specified pool. */
spaname = spa_name(dp->dp_spa);
if (strcmp(buf, spaname) != 0) {
- err = SET_ERROR(EINVAL);
+ err = SET_ERROR(EXDEV);
goto error;
}
@@ -1209,7 +1209,7 @@ dsl_dir_rename_check(void *arg, dmu_tx_t *tx)
if (dd->dd_pool != newparent->dd_pool) {
dsl_dir_rele(newparent, FTAG);
dsl_dir_rele(dd, FTAG);
- return (SET_ERROR(ENXIO));
+ return (SET_ERROR(EXDEV));
}
/* new name should not already exist */