|
@@ -1649,7 +1649,7 @@ struct cifsFileInfo *find_readable_file(struct cifsInodeInfo *cifs_inode,
|
|
|
are always at the end of the list but since the first entry might
|
|
|
have a close pending, we go through the whole list */
|
|
|
list_for_each_entry(open_file, &cifs_inode->openFileList, flist) {
|
|
|
- if (fsuid_only && open_file->uid != current_fsuid())
|
|
|
+ if (fsuid_only && !uid_eq(open_file->uid, current_fsuid()))
|
|
|
continue;
|
|
|
if (OPEN_FMODE(open_file->f_flags) & FMODE_READ) {
|
|
|
if (!open_file->invalidHandle) {
|
|
@@ -1702,7 +1702,7 @@ refind_writable:
|
|
|
list_for_each_entry(open_file, &cifs_inode->openFileList, flist) {
|
|
|
if (!any_available && open_file->pid != current->tgid)
|
|
|
continue;
|
|
|
- if (fsuid_only && open_file->uid != current_fsuid())
|
|
|
+ if (fsuid_only && !uid_eq(open_file->uid, current_fsuid()))
|
|
|
continue;
|
|
|
if (OPEN_FMODE(open_file->f_flags) & FMODE_WRITE) {
|
|
|
if (!open_file->invalidHandle) {
|