diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index b9d002a446..ea0b13124c 100644 --- a/src/afs/LINUX/osi_vnodeops.c +++ b/src/afs/LINUX/osi_vnodeops.c @@ -570,7 +570,7 @@ afs_linux_flush(struct file *fp) AFS_GLOCK(); - if (fp->f_flags | O_RDONLY) { /* readers dont flush */ + if ((fp->f_flags & O_ACCMODE) == O_RDONLY) { /* readers dont flush */ AFS_GUNLOCK(); return 0; }