summaryrefslogtreecommitdiffstats
path: root/drivers/block/loop.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-02-11 20:23:51 +0100
committerEric W. Biederman <ebiederm@xmission.com>2012-09-21 12:13:20 +0200
commite4849737f76c8767e70dc1575f6e59fc3682b3fe (patch)
treebe063ec6b7090febc567f37cafd4133b7c2b292b /drivers/block/loop.c
parentuserns: Convert ipathfs to use GLOBAL_ROOT_UID and GLOBAL_ROOT_GID (diff)
downloadlinux-e4849737f76c8767e70dc1575f6e59fc3682b3fe.tar.xz
linux-e4849737f76c8767e70dc1575f6e59fc3682b3fe.zip
userns: Convert loop to use kuid_t instead of uid_t
Cc: Jens Axboe <jaxboe@fusionio.com> Acked-by: Serge Hallyn <serge.hallyn@canonical.com> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'drivers/block/loop.c')
-rw-r--r--drivers/block/loop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 3bba65510d23..e9d594fd12cb 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -1038,10 +1038,10 @@ loop_set_status(struct loop_device *lo, const struct loop_info64 *info)
{
int err;
struct loop_func_table *xfer;
- uid_t uid = current_uid();
+ kuid_t uid = current_uid();
if (lo->lo_encrypt_key_size &&
- lo->lo_key_owner != uid &&
+ !uid_eq(lo->lo_key_owner, uid) &&
!capable(CAP_SYS_ADMIN))
return -EPERM;
if (lo->lo_state != Lo_bound)