[PATCH] ext4: fix ext4_dirty_inode() compile warning

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

 



Hi Ted:

Apparently my patch for

   ext4: Make sure ext4_dirty_inode() updates the inode in no journal mode

didn't play well if CONFIG_JBD_DEBUG wasn't defined.

Here are two patches that fix it.  I don't know if the jbd_debug() call has
any importance or not; you can choose which is better perhaps?

Thanks,
Curt

==============================================

Remove jbd_debug() call from ext4_inode_dirty()

	Signed-off-by: Curt Wohlgemuth <curtw@xxxxxxxxxx>

--- fs/ext4/inode.c.orig	2009-10-02 09:04:36.000000000 -0700
+++ fs/ext4/inode.c	2009-10-02 09:05:31.000000000 -0700
@@ -5851,14 +5851,12 @@ int ext4_mark_inode_dirty(handle_t *hand
  */
 void ext4_dirty_inode(struct inode *inode)
 {
-	handle_t *current_handle = ext4_journal_current_handle();
 	handle_t *handle;

 	handle = ext4_journal_start(inode, 2);
 	if (IS_ERR(handle))
 		goto out;

-	jbd_debug(5, "marking dirty.  outer handle=%p\n", current_handle);
 	ext4_mark_inode_dirty(handle, inode);

 	ext4_journal_stop(handle);

==============================================

Make sure ext4_inode_dirty() compiles if CONFIG_JBD_DEBUG is not defined.

	Signed-off-by: Curt Wohlgemuth <curtw@xxxxxxxxxx>

--- fs/ext4/inode.c.orig	2009-10-02 09:04:36.000000000 -0700
+++ fs/ext4/inode.c	2009-10-02 09:07:31.000000000 -0700
@@ -5851,7 +5851,9 @@ int ext4_mark_inode_dirty(handle_t *hand
  */
 void ext4_dirty_inode(struct inode *inode)
 {
+#ifdef CONFIG_JBD_DEBUG
 	handle_t *current_handle = ext4_journal_current_handle();
+#endif
 	handle_t *handle;

 	handle = ext4_journal_start(inode, 2);
--
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