[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: tune2fs 1.21 ext2fs_add_journal_inode problem



This worked for me.  I've added it to the previous e2fsprogs patch.
--- e2fsprogs-1.21/lib/ext2fs/mkjournal.c~      Sat Jun 23 08:58:03 2001
+++ e2fsprogs-1.21/lib/ext2fs/mkjournal.c       Sat Jun 23 08:58:46 2001
@@ -321,7 +321,6 @@
                /* Create the journal file */
                if ((fd = open(jfile, O_CREAT|O_WRONLY, 0600)) < 0)
                        return errno;
-               close(fd);
 
                if ((retval = write_journal_file(fs, jfile, size, flags)))
                        return retval;
@@ -338,6 +337,7 @@
                retval = ioctl(fd, EXT2_IOC_SETFLAGS, &f);
 #endif
 #endif
+               close(fd);
                if (retval)
                        return retval;
 
------------------
Thanks,
Albert
Theodore Tso wrote:
> 
> On Fri, Jun 22, 2001 at 10:21:31AM -0400, Marc Boucher wrote:
> > Hi Ted, ext3 folks,
> >
> > Here's what I get when trying to add an ext3 journal to a mounted ext2
> > filesystem here:
> >
> > which is not surprising, given that the filedescriptor is closed
> > (and not re-opened) before the fstat in ext2fs_add_journal_inode()
> 
> Whoops, brain-o on my part.  The close(fd) should be moved after the
> fchflags/ioctl call.  I accidentally introduced in this bug in 1.21;
> it'll be fixed in 1.22.
> 
>                                                 - Ted
> 
> _______________________________________________
> Ext3-users mailing list
> Ext3-users redhat com
> https://listman.redhat.com/mailman/listinfo/ext3-users

-- 
Albert Cranford Deerfield Beach FL USA
ac9410 bellsouth net





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]