Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d79e5043 authored by Arne Jansen's avatar Arne Jansen Committed by Chris Mason
Browse files

Btrfs: send correct rdev and mode in btrfs-send



When sending a device file, the stream was missing the mode. Also the
rdev was encoded wrongly.

Signed-off-by: default avatarArne Jansen <sensille@gmx.net>
parent 96b5bd77
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2462,7 +2462,8 @@ verbose_printk("btrfs: send_create_inode %llu\n", ino);
		TLV_PUT_PATH(sctx, BTRFS_SEND_A_PATH_LINK, p);
	} else if (S_ISCHR(mode) || S_ISBLK(mode) ||
		   S_ISFIFO(mode) || S_ISSOCK(mode)) {
		TLV_PUT_U64(sctx, BTRFS_SEND_A_RDEV, rdev);
		TLV_PUT_U64(sctx, BTRFS_SEND_A_RDEV, new_encode_dev(rdev));
		TLV_PUT_U64(sctx, BTRFS_SEND_A_MODE, mode);
	}

	ret = send_cmd(sctx);