Whamcloud - gitweb
e2fsck: zero ctx->fs after freeing fs when restarting due to MMP
authorDarrick J. Wong <djwong@us.ibm.com>
Fri, 30 Sep 2011 19:40:05 +0000 (12:40 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 1 Oct 2011 01:28:21 +0000 (21:28 -0400)
commit1660034c0a0c7199b0843909c756f8f9e42b85f5
tree59e3c54d451d3512139520bea8964d4dc627be0d
parenta7a63675af85b4b636e9df4961ca44ea03bf160b
e2fsck: zero ctx->fs after freeing fs when restarting due to MMP

If MMP is enabled and e2fsck determines that it needs to restart
itself on account of various MMP conditions, it will close the current
fs and jump back to the start of fs checking.  However, closing fs
also frees it, which means that we need to set ctx->fs to NULL to
prevent subsequent open code from accessing the old deleted pointer.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
e2fsck/unix.c