ocfs2: Add parenthesis to wrap the check for O_DIRECT.

This change “ocfs2: Add parenthesis to wrap the check for O_DIRECT.” (commit 60c4867) in Linux kernel is authored by Tao Ma <tao.ma [at] oracle.com> on Wed Feb 3 09:56:04 2010 +0800.

Description of "ocfs2: Add parenthesis to wrap the check for O_DIRECT."

The change “ocfs2: Add parenthesis to wrap the check for O_DIRECT.” introduces changes as follows.

ocfs2: Add parenthesis to wrap the check for O_DIRECT.

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>

Linux kernel releases containing commit 60c4867

The Linux kernel releases containing this commit are as follows.

Linux kernel code changes from "ocfs2: Add parenthesis to wrap the check for O_DIRECT."

There are 4 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 fs/ocfs2/file.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 65e9375d2fb3..558ce0312421 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -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)

The commit for this change in Linux stable tree is 60c4867 (patch).

Last modified: 2020/02/10