]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
xfs: dquots should be stamped with sb_meta_uuid
authorDave Chinner <dchinner@redhat.com>
Wed, 19 Aug 2015 00:32:01 +0000 (10:32 +1000)
committerDave Chinner <david@fromorbit.com>
Wed, 19 Aug 2015 00:32:01 +0000 (10:32 +1000)
Once the sb_uuid is changed, the wrong uuid is stamped into new
dquots on disk. Found by inspection, verified by generic/219.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_dquot.c

index 4143dc75dca4b22b15003ebd1bce5b3561a5deb8..b1b26b6a0735f10cd21547dd2abe5741335754a5 100644 (file)
@@ -251,7 +251,7 @@ xfs_qm_init_dquot_blk(
                d->dd_diskdq.d_id = cpu_to_be32(curid);
                d->dd_diskdq.d_flags = type;
                if (xfs_sb_version_hascrc(&mp->m_sb)) {
-                       uuid_copy(&d->dd_uuid, &mp->m_sb.sb_uuid);
+                       uuid_copy(&d->dd_uuid, &mp->m_sb.sb_meta_uuid);
                        xfs_update_cksum((char *)d, sizeof(struct xfs_dqblk),
                                         XFS_DQUOT_CRC_OFF);
                }