linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ext4: fix ext4_dirty_inode() compile warning
@ 2009-10-02 16:22 Curt Wohlgemuth
  2009-10-03  1:09 ` Theodore Tso
  0 siblings, 1 reply; 2+ messages in thread
From: Curt Wohlgemuth @ 2009-10-02 16:22 UTC (permalink / raw)
  To: Theodore Tso; +Cc: ext4 development

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

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

--- 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);

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

* Re: [PATCH] ext4: fix ext4_dirty_inode() compile warning
  2009-10-02 16:22 [PATCH] ext4: fix ext4_dirty_inode() compile warning Curt Wohlgemuth
@ 2009-10-03  1:09 ` Theodore Tso
  0 siblings, 0 replies; 2+ messages in thread
From: Theodore Tso @ 2009-10-03  1:09 UTC (permalink / raw)
  To: Curt Wohlgemuth; +Cc: ext4 development

On Fri, Oct 02, 2009 at 09:22:18AM -0700, Curt Wohlgemuth wrote:
> 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?

I chose the first one, with a slightly elaborated commit message.

Thanks,

							- Ted

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

end of thread, other threads:[~2009-10-03  1:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-02 16:22 [PATCH] ext4: fix ext4_dirty_inode() compile warning Curt Wohlgemuth
2009-10-03  1:09 ` Theodore Tso

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