smb: client: set correct device number on nfs reparse points
authorPaulo Alcantara <pc@manguebit.com>
Thu, 19 Sep 2024 00:53:35 +0000 (21:53 -0300)
committerSteve French <stfrench@microsoft.com>
Wed, 25 Sep 2024 02:51:48 +0000 (21:51 -0500)
Fix major and minor numbers set on special files created with NFS
reparse points.

Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/reparse.c

index 48c27581ec511cd4f90b342850fcfd99b2772bff..63984796721a50a8cdaaa53f7570cd4222852f98 100644 (file)
@@ -108,8 +108,8 @@ static int nfs_set_reparse_buf(struct reparse_posix_data *buf,
        buf->InodeType = cpu_to_le64(type);
        buf->ReparseDataLength = cpu_to_le16(len + dlen -
                                             sizeof(struct reparse_data_buffer));
-       *(__le64 *)buf->DataBuffer = cpu_to_le64(((u64)MAJOR(dev) << 32) |
-                                                MINOR(dev));
+       *(__le64 *)buf->DataBuffer = cpu_to_le64(((u64)MINOR(dev) << 32) |
+                                                MAJOR(dev));
        iov->iov_base = buf;
        iov->iov_len = len + dlen;
        return 0;