OSDN Git Service

e2fsck: allow checking on mounted root fs
authorAndreas Dilger <adilger@whamcloud.com>
Thu, 31 May 2012 20:39:54 +0000 (16:39 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 31 May 2012 20:41:41 +0000 (16:41 -0400)
commitcd5bb7c87b1891e21c095b3ecd549ef44a067c08
tree5420696e44ce0082dbfdafb0df088194840dd0e5
parentf3331df6bb5d380efd72e07fc9b40c998b355412
e2fsck: allow checking on mounted root fs

Commit 732e26b98e5c79a4298dbe341f43b54b354bb241 added checks to
prevent e2fsck from being run in filesystem-modifying mode against
a mounted or otherwise busy device, due to several bug reports of
users doing this even with the verbose warnings in check_mount().

However, it also prevented e2fsck from checking a mounted root
filesystem, which will prevent the node from booting.  Once again
allow e2fsck to run against the mounted root filesystem if it is
also mounted read-only at the time.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2fsck/unix.c