[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <6601abe91003261501i1a12a953n9c2367ed4b0dd3b2@mail.gmail.com>
Date: Fri, 26 Mar 2010 15:01:26 -0700
From: Curt Wohlgemuth <curtw@...gle.com>
To: ext4 development <linux-ext4@...r.kernel.org>
Subject: [PATCH] ext4: use __ext4_get_inode_loc() from ext4_write_inode()
Fix for no-journal ext4_write_inode() code path: ensure in_mem is 0 on call
to __ext4_get_inode_loc()
Signed-off-by: Curt Wohlgemuth <curtw@...gle.com>
---
In the no-journal case, ext4_write_inode() simply gets the BH for the inode
table block and calls sync_dirty_buffer() on it. But it doesn't copy the
in-memory inode contents to the on-disk format on the BH. So it *must* not
cause the in_mem parameter to __ext4_get_inode_loc() to be 1, which it will
be if it uses ext4_get_inode_loc().
diff -uprN orig/fs/ext4/inode.c new/fs/ext4/inode.c
--- orig/fs/ext4/inode.c 2010-03-22 08:16:57.000000000 -0700
+++ new/fs/ext4/inode.c 2010-03-26 14:50:38.000000000 -0700
@@ -5374,7 +5374,7 @@ int ext4_write_inode(struct inode *inode
} else {
struct ext4_iloc iloc;
- err = ext4_get_inode_loc(inode, &iloc);
+ err = __ext4_get_inode_loc(inode, &iloc, 0);
if (err)
return err;
if (wbc->sync_mode == WB_SYNC_ALL)
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists