Whamcloud - gitweb
Change mke2fs to create filesystems with the device opened in exclusive mode.
authorTheodore Ts'o <tytso@mit.edu>
Sun, 19 Mar 2006 01:02:05 +0000 (20:02 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 19 Mar 2006 01:02:05 +0000 (20:02 -0500)
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
misc/ChangeLog
misc/mke2fs.c

index dd1c1da..511d29b 100644 (file)
@@ -1,3 +1,8 @@
+2006-03-18  Theodore Ts'o  <tytso@mit.edu>
+
+       * mke2fs.c (main): Open the filesystem in exclusive mode while we
+               are initializing it.
+
 2005-12-31  Theodore Ts'o  <tytso@mit.edu>
 
        * chattr.1.in: Add notes in the man page to make sure the reader
index c80c1ef..7d9b898 100644 (file)
@@ -1429,7 +1429,7 @@ int main (int argc, char *argv[])
        /*
         * Initialize the superblock....
         */
-       retval = ext2fs_initialize(device_name, 0, &fs_param,
+       retval = ext2fs_initialize(device_name, EXT2_FLAG_EXCLUSIVE, &fs_param,
                                   io_ptr, &fs);
        if (retval) {
                com_err(device_name, retval, _("while setting up superblock"));