Skip to content

Commit

Permalink
ocfs2: Add parenthesis to wrap the check for O_DIRECT.
Browse files Browse the repository at this point in the history
Add parenthesis to wrap the check for O_DIRECT.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
  • Loading branch information
Tao Ma authored and Joel Becker committed Feb 3, 2010
1 parent 0a1ea43 commit 60c4867
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/ocfs2/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -2013,8 +2013,8 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb,
/* buffered aio wouldn't have proper lock coverage today */
BUG_ON(ret == -EIOCBQUEUED && !(file->f_flags & O_DIRECT));

if ((file->f_flags & O_DSYNC && !direct_io) || IS_SYNC(inode) ||
(file->f_flags & O_DIRECT && has_refcount)) {
if (((file->f_flags & O_DSYNC) && !direct_io) || IS_SYNC(inode) ||
((file->f_flags & O_DIRECT) && has_refcount)) {
ret = filemap_fdatawrite_range(file->f_mapping, pos,
pos + count - 1);
if (ret < 0)
Expand Down

0 comments on commit 60c4867

Please sign in to comment.