All of lore.kernel.org
 help / color / mirror / Atom feed
* [Ocfs2-devel] [PATCH] ocfs2: one more warning fix in ocfs2_file_aio_write(), v2
@ 2010-03-25 21:15 Coly Li
  2010-04-01  0:52 ` Joel Becker
  0 siblings, 1 reply; 2+ messages in thread
From: Coly Li @ 2010-03-25 21:15 UTC (permalink / raw)
  To: ocfs2-devel

This patch fixes another compiling warning in ocfs2_file_aio_write() like this,
    fs/ocfs2/file.c: In function ?ocfs2_file_aio_write?:
    fs/ocfs2/file.c:2026: warning: suggest parentheses around ?&&? within ?||?

As Joel suggested, '!ret' is unary, this version removes the wrap from '!ret'.

Signed-off-by: Coly Li <coly.li@suse.de>
Cc: Joel Becker <joel.becker@oracle.com>
---
 fs/ocfs2/file.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 17947dc..c4638fd 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -2021,8 +2021,8 @@ out_dio:
 		if (ret < 0)
 			written = ret;

-		if (!ret && (old_size != i_size_read(inode) ||
-		    old_clusters != OCFS2_I(inode)->ip_clusters ||
+		if (!ret && ((old_size != i_size_read(inode)) ||
+		    (old_clusters != OCFS2_I(inode)->ip_clusters) ||
 		    has_refcount)) {
 			ret = jbd2_journal_force_commit(osb->journal->j_journal);
 			if (ret < 0)
-- 
Coly Li
SuSE Labs

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

* [Ocfs2-devel] [PATCH] ocfs2: one more warning fix in ocfs2_file_aio_write(), v2
  2010-03-25 21:15 [Ocfs2-devel] [PATCH] ocfs2: one more warning fix in ocfs2_file_aio_write(), v2 Coly Li
@ 2010-04-01  0:52 ` Joel Becker
  0 siblings, 0 replies; 2+ messages in thread
From: Joel Becker @ 2010-04-01  0:52 UTC (permalink / raw)
  To: ocfs2-devel

On Fri, Mar 26, 2010 at 05:15:12AM +0800, Coly Li wrote:
> This patch fixes another compiling warning in ocfs2_file_aio_write() like this,
>     fs/ocfs2/file.c: In function ?ocfs2_file_aio_write?:
>     fs/ocfs2/file.c:2026: warning: suggest parentheses around ?&&? within ?||?
> 
> As Joel suggested, '!ret' is unary, this version removes the wrap from '!ret'.

	This patch is now in the fixes branch of ocfs2.git.

Joel

-- 

"You don't make the poor richer by making the rich poorer."
	- Sir Winston Churchill

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127

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

end of thread, other threads:[~2010-04-01  0:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-25 21:15 [Ocfs2-devel] [PATCH] ocfs2: one more warning fix in ocfs2_file_aio_write(), v2 Coly Li
2010-04-01  0:52 ` Joel Becker

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.