diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2013-02-06 05:23:02 -0500 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2013-02-13 10:28:52 -0500 |
commit | fef59fd728366aa9bf125b8859aff84fa0bd1a36 (patch) | |
tree | a750377dd57e7796e0512e4a89bad13ae655fde1 /fs/cifs | |
parent | 4a2c8cf56953a6ebe3c8671433607b7f96f200d5 (diff) |
cifs: Convert struct cifsFileInfo to use a kuid
Cc: Steve French <smfrench@gmail.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/cifsglob.h | 2 | ||||
-rw-r--r-- | fs/cifs/file.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index 98312fda0d35..04aa74e5b348 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h | |||
@@ -930,7 +930,7 @@ struct cifsFileInfo { | |||
930 | struct list_head tlist; /* pointer to next fid owned by tcon */ | 930 | struct list_head tlist; /* pointer to next fid owned by tcon */ |
931 | struct list_head flist; /* next fid (file instance) for this inode */ | 931 | struct list_head flist; /* next fid (file instance) for this inode */ |
932 | struct cifs_fid_locks *llist; /* brlocks held by this fid */ | 932 | struct cifs_fid_locks *llist; /* brlocks held by this fid */ |
933 | unsigned int uid; /* allows finding which FileInfo structure */ | 933 | kuid_t uid; /* allows finding which FileInfo structure */ |
934 | __u32 pid; /* process id who opened file */ | 934 | __u32 pid; /* process id who opened file */ |
935 | struct cifs_fid fid; /* file id from remote */ | 935 | struct cifs_fid fid; /* file id from remote */ |
936 | /* BB add lock scope info here if needed */ ; | 936 | /* BB add lock scope info here if needed */ ; |
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index b9baf5f66349..c23fbd81fe1a 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -1649,7 +1649,7 @@ struct cifsFileInfo *find_readable_file(struct cifsInodeInfo *cifs_inode, | |||
1649 | are always at the end of the list but since the first entry might | 1649 | are always at the end of the list but since the first entry might |
1650 | have a close pending, we go through the whole list */ | 1650 | have a close pending, we go through the whole list */ |
1651 | list_for_each_entry(open_file, &cifs_inode->openFileList, flist) { | 1651 | list_for_each_entry(open_file, &cifs_inode->openFileList, flist) { |
1652 | if (fsuid_only && open_file->uid != current_fsuid()) | 1652 | if (fsuid_only && !uid_eq(open_file->uid, current_fsuid())) |
1653 | continue; | 1653 | continue; |
1654 | if (OPEN_FMODE(open_file->f_flags) & FMODE_READ) { | 1654 | if (OPEN_FMODE(open_file->f_flags) & FMODE_READ) { |
1655 | if (!open_file->invalidHandle) { | 1655 | if (!open_file->invalidHandle) { |
@@ -1702,7 +1702,7 @@ refind_writable: | |||
1702 | list_for_each_entry(open_file, &cifs_inode->openFileList, flist) { | 1702 | list_for_each_entry(open_file, &cifs_inode->openFileList, flist) { |
1703 | if (!any_available && open_file->pid != current->tgid) | 1703 | if (!any_available && open_file->pid != current->tgid) |
1704 | continue; | 1704 | continue; |
1705 | if (fsuid_only && open_file->uid != current_fsuid()) | 1705 | if (fsuid_only && !uid_eq(open_file->uid, current_fsuid())) |
1706 | continue; | 1706 | continue; |
1707 | if (OPEN_FMODE(open_file->f_flags) & FMODE_WRITE) { | 1707 | if (OPEN_FMODE(open_file->f_flags) & FMODE_WRITE) { |
1708 | if (!open_file->invalidHandle) { | 1708 | if (!open_file->invalidHandle) { |