Skip to content

Commit

Permalink
ocfs2: one more warning fix in ocfs2_file_aio_write(), v2
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
  • Loading branch information
Coly Li authored and Joel Becker committed Mar 30, 2010
1 parent efd647f commit a03ab78
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fs/ocfs2/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -2021,9 +2021,9 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb,
if (ret < 0)
written = ret;

if (!ret && (old_size != i_size_read(inode) ||
old_clusters != OCFS2_I(inode)->ip_clusters ||
has_refcount)) {
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)
written = ret;
Expand Down

0 comments on commit a03ab78

Please sign in to comment.