Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357841
b: refs/heads/master
c: fef59fd
h: refs/heads/master
i:
  357839: f80a525
v: v3
  • Loading branch information
Eric W. Biederman committed Feb 13, 2013
1 parent c26bfc5 commit 81ede10
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4a2c8cf56953a6ebe3c8671433607b7f96f200d5
refs/heads/master: fef59fd728366aa9bf125b8859aff84fa0bd1a36
2 changes: 1 addition & 1 deletion trunk/fs/cifs/cifsglob.h
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ struct cifsFileInfo {
struct list_head tlist; /* pointer to next fid owned by tcon */
struct list_head flist; /* next fid (file instance) for this inode */
struct cifs_fid_locks *llist; /* brlocks held by this fid */
unsigned int uid; /* allows finding which FileInfo structure */
kuid_t uid; /* allows finding which FileInfo structure */
__u32 pid; /* process id who opened file */
struct cifs_fid fid; /* file id from remote */
/* BB add lock scope info here if needed */ ;
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/cifs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -1702,7 +1702,7 @@ struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *cifs_inode,
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) {
Expand Down

0 comments on commit 81ede10

Please sign in to comment.