From: Jan Kara Subject: [PATCH] Bug in ext3 when setting +j on inode Date: Mon, 19 Jan 2004 15:53:38 +0100 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <20040119145338.GJ653@atrey.karlin.mff.cuni.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: akpm@osdl.org Return-path: Received: from atrey.karlin.mff.cuni.cz ([195.113.31.123]:49042 "EHLO atrey.karlin.mff.cuni.cz") by vger.kernel.org with ESMTP id S265094AbUASOxj (ORCPT ); Mon, 19 Jan 2004 09:53:39 -0500 To: linux-fsdevel@vger.kernel.org Content-Disposition: inline List-Id: linux-fsdevel.vger.kernel.org Hi, I think there's a problem that when inode is set data journalled then its inode operations are not updated correctly. Attached patch fixes that. The patch is against 2.6.0 but should apply to 2.6.1 well. Honza -- Jan Kara SuSE CR Labs diff -ruNX /home/jack/.kerndiffexclude linux-2.6.0-um/fs/ext3/inode.c linux-2.6.0-um-1-jquota/fs/ext3/inode.c --- linux-2.6.0-um/fs/ext3/inode.c 2003-11-26 21:44:43.000000000 +0100 +++ linux-2.6.0-um-1-jquota/fs/ext3/inode.c 2004-01-18 20:32:17.000000000 +0100 @@ -3032,10 +3050,14 @@ * the inode's in-core data-journaling state flag now. */ - if (val) + if (val) { EXT3_I(inode)->i_flags |= EXT3_JOURNAL_DATA_FL; - else + ext3_set_aops(inode); + } + else { EXT3_I(inode)->i_flags &= ~EXT3_JOURNAL_DATA_FL; + ext3_set_aops(inode); + } journal_unlock_updates(journal);