Whamcloud - gitweb
mmp: don't use O_RDWR in ext2fs_mmp_read
It doesn't seem to be necessary since ext2fs_mmp_write doesn't write
via mmp_fd, and opening the block device with O_RDWR will trigger
udev.
Triggering udev is bad because it leads to an infinite loop when
running dumpe2fs in response to a udev event.
[ Rebased onto the maint branch, and added O_RDONLY flag. From the
open(2) man page: "The argument flags must include one of the
following access modes: O_RDONLY, O_WRONLY, or O_RDWR." -- TYT ]
Signed-off-by: Theodore Ts'o <tytso@mit.edu>