From 81ede1034fb58dc9978946ac6539415323aac734 Mon Sep 17 00:00:00 2001 From: "Eric W. Biederman" Date: Wed, 6 Feb 2013 02:23:02 -0800 Subject: [PATCH] --- yaml --- r: 357841 b: refs/heads/master c: fef59fd728366aa9bf125b8859aff84fa0bd1a36 h: refs/heads/master i: 357839: f80a5254af57d4bb236b6bacb02db50b8017b49c v: v3 --- [refs] | 2 +- trunk/fs/cifs/cifsglob.h | 2 +- trunk/fs/cifs/file.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index c87069b57b2f..68b3896524b0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4a2c8cf56953a6ebe3c8671433607b7f96f200d5 +refs/heads/master: fef59fd728366aa9bf125b8859aff84fa0bd1a36 diff --git a/trunk/fs/cifs/cifsglob.h b/trunk/fs/cifs/cifsglob.h index 98312fda0d35..04aa74e5b348 100644 --- a/trunk/fs/cifs/cifsglob.h +++ b/trunk/fs/cifs/cifsglob.h @@ -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 */ ; diff --git a/trunk/fs/cifs/file.c b/trunk/fs/cifs/file.c index b9baf5f66349..c23fbd81fe1a 100644 --- a/trunk/fs/cifs/file.c +++ b/trunk/fs/cifs/file.c @@ -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 @@ 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) {