diff --git a/src/basic/btrfs-util.c b/src/basic/btrfs-util.c index 77e9d90917..7720d98009 100644 --- a/src/basic/btrfs-util.c +++ b/src/basic/btrfs-util.c @@ -1690,7 +1690,7 @@ int btrfs_subvol_snapshot_fd(int old_fd, const char *new_path, BtrfsSnapshotFlag if (r == -ENOTTY && (flags & BTRFS_SNAPSHOT_FALLBACK_DIRECTORY)) { /* If the destination doesn't support subvolumes, then use a plain directory, if that's requested. */ if (mkdir(new_path, 0755) < 0) - return r; + return -errno; plain_directory = true; } else if (r < 0)