linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ext4: use __ext4_get_inode_loc() from ext4_write_inode()
@ 2010-03-26 22:01 Curt Wohlgemuth
  2010-04-03 21:28 ` tytso
  0 siblings, 1 reply; 2+ messages in thread
From: Curt Wohlgemuth @ 2010-03-26 22:01 UTC (permalink / raw)
  To: ext4 development

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@google.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)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-04-03 21:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-26 22:01 [PATCH] ext4: use __ext4_get_inode_loc() from ext4_write_inode() Curt Wohlgemuth
2010-04-03 21:28 ` tytso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).