提交 a03ab788 编写于 作者: C Coly Li 提交者: Joel Becker

ocfs2: one more warning fix in ocfs2_file_aio_write(), v2

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: NColy Li <coly.li@suse.de>
Signed-off-by: NJoel Becker <joel.becker@oracle.com>
上级 efd647f7
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册