]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Correct error returns to unify cross-pool operation error handling
authorBoris Protopopov <boris.protopopov@actifio.com>
Wed, 19 Nov 2014 17:08:08 +0000 (12:08 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 19 Dec 2014 18:51:24 +0000 (10:51 -0800)
Signed-off-by: Boris Protopopov <boris.protopopov@actifio.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #2911

module/zfs/dsl_dir.c

index 7eafdfd2efa40a9f614b3bbe71672aa38137e30f..4cbe04e2d0efbfa3482b4191e9aefd4aaccd59cc 100644 (file)
@@ -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 */