This prevents accidentally replaying and resetting the journal while
it is mounted, due to an accidental attempt to run e2fsck on an LVM
snapshot of a file system with an external journal.
Addresses-Debian-Bug: #587531
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
#ifndef USE_INODE_IO
if (ext_journal)
#endif
- retval = io_ptr->open(journal_name, IO_FLAG_RW,
+ retval = io_ptr->open(journal_name,
+ IO_FLAG_RW | IO_FLAG_EXCLUSIVE,
&ctx->journal_io);
if (retval)
goto errout;