From: Eric W. Biederman Date: Tue, 29 Jul 2014 00:10:56 +0000 (-0700) Subject: mnt: Move the test for MNT_LOCK_READONLY from change_mount_flags into do_remount X-Git-Tag: cleanup-for-v3.18~58^2~8 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=07b645589dcda8b7a5249e096fece2a67556f0f4;p=pandora-kernel.git mnt: Move the test for MNT_LOCK_READONLY from change_mount_flags into do_remount There are no races as locked mount flags are guaranteed to never change. Moving the test into do_remount makes it more visible, and ensures all filesystem remounts pass the MNT_LOCK_READONLY permission check. This second case is not an issue today as filesystem remounts are guarded by capable(CAP_DAC_ADMIN) and thus will always fail in less privileged mount namespaces, but it could become an issue in the future. Cc: stable@vger.kernel.org Acked-by: Serge E. Hallyn Signed-off-by: "Eric W. Biederman" --- Reading git-diff-tree failed