[PATCH] ext4: use __ext4_get_inode_loc() from ext4_write_inode()

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

 



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@xxxxxxxxxx>
---

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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux