* dentry_open after call to open_namei that checks permissions.
* Only nfsd_open call dentry_open directly without checking
* permissions and because of that this code below is safe. */
- if (oit.it_flags & FMODE_WRITE)
+ if (oit.it_flags & (FMODE_WRITE | FMODE_READ))
oit.it_flags |= MDS_OPEN_OWNEROVERRIDE;
/* We do not want O_EXCL here, presumably we opened the file