diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2013-02-06 04:48:56 -0500 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2013-02-13 10:28:50 -0500 |
commit | 6d4a083205c27bc2e2a1c03dff4acf2fe457d1c4 (patch) | |
tree | 007bdb38e53798bf434a71aa74adb018b3bb9683 /fs/cifs | |
parent | 49418b2c28c901294f8b36ff14c766c9458c3623 (diff) |
cifs: Convert struct tcon_link 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/connect.c | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index aea1eec64911..7993a7a07ae2 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h | |||
@@ -837,7 +837,7 @@ struct cifs_tcon { | |||
837 | */ | 837 | */ |
838 | struct tcon_link { | 838 | struct tcon_link { |
839 | struct rb_node tl_rbnode; | 839 | struct rb_node tl_rbnode; |
840 | uid_t tl_uid; | 840 | kuid_t tl_uid; |
841 | unsigned long tl_flags; | 841 | unsigned long tl_flags; |
842 | #define TCON_LINK_MASTER 0 | 842 | #define TCON_LINK_MASTER 0 |
843 | #define TCON_LINK_PENDING 1 | 843 | #define TCON_LINK_PENDING 1 |
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 17c3643e5950..541169459223 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -3919,7 +3919,7 @@ cifs_set_vol_auth(struct smb_vol *vol, struct cifs_ses *ses) | |||
3919 | } | 3919 | } |
3920 | 3920 | ||
3921 | static struct cifs_tcon * | 3921 | static struct cifs_tcon * |
3922 | cifs_construct_tcon(struct cifs_sb_info *cifs_sb, uid_t fsuid) | 3922 | cifs_construct_tcon(struct cifs_sb_info *cifs_sb, kuid_t fsuid) |
3923 | { | 3923 | { |
3924 | int rc; | 3924 | int rc; |
3925 | struct cifs_tcon *master_tcon = cifs_sb_master_tcon(cifs_sb); | 3925 | struct cifs_tcon *master_tcon = cifs_sb_master_tcon(cifs_sb); |
@@ -3989,7 +3989,7 @@ cifs_sb_tcon_pending_wait(void *unused) | |||
3989 | 3989 | ||
3990 | /* find and return a tlink with given uid */ | 3990 | /* find and return a tlink with given uid */ |
3991 | static struct tcon_link * | 3991 | static struct tcon_link * |
3992 | tlink_rb_search(struct rb_root *root, uid_t uid) | 3992 | tlink_rb_search(struct rb_root *root, kuid_t uid) |
3993 | { | 3993 | { |
3994 | struct rb_node *node = root->rb_node; | 3994 | struct rb_node *node = root->rb_node; |
3995 | struct tcon_link *tlink; | 3995 | struct tcon_link *tlink; |
@@ -3997,9 +3997,9 @@ tlink_rb_search(struct rb_root *root, uid_t uid) | |||
3997 | while (node) { | 3997 | while (node) { |
3998 | tlink = rb_entry(node, struct tcon_link, tl_rbnode); | 3998 | tlink = rb_entry(node, struct tcon_link, tl_rbnode); |
3999 | 3999 | ||
4000 | if (tlink->tl_uid > uid) | 4000 | if (uid_gt(tlink->tl_uid, uid)) |
4001 | node = node->rb_left; | 4001 | node = node->rb_left; |
4002 | else if (tlink->tl_uid < uid) | 4002 | else if (uid_lt(tlink->tl_uid, uid)) |
4003 | node = node->rb_right; | 4003 | node = node->rb_right; |
4004 | else | 4004 | else |
4005 | return tlink; | 4005 | return tlink; |
@@ -4018,7 +4018,7 @@ tlink_rb_insert(struct rb_root *root, struct tcon_link *new_tlink) | |||
4018 | tlink = rb_entry(*new, struct tcon_link, tl_rbnode); | 4018 | tlink = rb_entry(*new, struct tcon_link, tl_rbnode); |
4019 | parent = *new; | 4019 | parent = *new; |
4020 | 4020 | ||
4021 | if (tlink->tl_uid > new_tlink->tl_uid) | 4021 | if (uid_gt(tlink->tl_uid, new_tlink->tl_uid)) |
4022 | new = &((*new)->rb_left); | 4022 | new = &((*new)->rb_left); |
4023 | else | 4023 | else |
4024 | new = &((*new)->rb_right); | 4024 | new = &((*new)->rb_right); |
@@ -4048,7 +4048,7 @@ struct tcon_link * | |||
4048 | cifs_sb_tlink(struct cifs_sb_info *cifs_sb) | 4048 | cifs_sb_tlink(struct cifs_sb_info *cifs_sb) |
4049 | { | 4049 | { |
4050 | int ret; | 4050 | int ret; |
4051 | uid_t fsuid = current_fsuid(); | 4051 | kuid_t fsuid = current_fsuid(); |
4052 | struct tcon_link *tlink, *newtlink; | 4052 | struct tcon_link *tlink, *newtlink; |
4053 | 4053 | ||
4054 | if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MULTIUSER)) | 4054 | if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MULTIUSER)) |