[PATCH v2 4/5] common: use _scratch_mount helper in _require_relatime()

Eryu Guan
2014-10-31T17:04:31Z

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>
---
common/rc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/rc b/common/rc
index 2d2b40f..b495ec1 100644
--- a/common/rc
+++ b/common/rc
@@ -2395,7 +2395,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
}
--
1.9.3