common: use _scratch_mount helper in _require_relatime()

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>
This commit is contained in:
Eryu Guan
2014-11-10 18:06:23 +11:00
committed by Dave Chinner
parent f72abf5f8f
commit 1bc9c1a06e
+1 -1
View File
@@ -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
}