]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
common: use _scratch_mount helper in _require_relatime()
authorEryu Guan <eguan@redhat.com>
Mon, 10 Nov 2014 07:06:23 +0000 (18:06 +1100)
committerDave Chinner <david@fromorbit.com>
Mon, 10 Nov 2014 07:06:23 +0000 (18:06 +1100)
Change the way how _require_relatime() mount $SCRATCH_DEV, use
_scratch_mount helper so $SCRATCH_DEV is mounted with selinux context,
to avoid "same superblock, different selinux context" failure.

Signed-off-by: Eryu Guan <eguan@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
common/rc

index fc18520da4b1c4f4d068404b0e4d30cee1391d28..d5e3aff0d7765ee0a0d8eac677201e13c15aa814 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -2399,7 +2399,7 @@ _require_atime()
 _require_relatime()
 {
         _scratch_mkfs > /dev/null 2>&1
-        _mount -t $FSTYP -o relatime $SCRATCH_DEV $SCRATCH_MNT || \
+        _scratch_mount -o relatime || \
                 _notrun "relatime not supported by the current kernel"
        _scratch_unmount
 }