]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Reserve an additional transaction block in
authorAndrew Morton <akpm@digeo.com>
Sat, 14 Dec 2002 11:18:11 +0000 (03:18 -0800)
committerJaroslav Kysela <perex@suse.cz>
Sat, 14 Dec 2002 11:18:11 +0000 (03:18 -0800)
Under rare conditions (filesystem corruption, really) it is possible
for ext3_dirty_inode() to require _two_ blocks for the transaction: one
for the inode and one to update the superblock - to set
EXT3_FEATURE_RO_COMPAT_LARGE_FILE.  This causes the filesystem to go
BUG.

So reserve an additional block for that eventuality.

fs/ext3/inode.c

index fe1c0cca19bb943145a353b12935a27adff69173..cf150fed6765c097807b26921f19c3395c84809c 100644 (file)
@@ -2697,7 +2697,7 @@ void ext3_dirty_inode(struct inode *inode)
        handle_t *handle;
 
        lock_kernel();
-       handle = ext3_journal_start(inode, 1);
+       handle = ext3_journal_start(inode, 2);
        if (IS_ERR(handle))
                goto out;
        if (current_handle &&