aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/loop.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-02-11 14:23:51 -0500
committerEric W. Biederman <ebiederm@xmission.com>2012-09-21 06:13:20 -0400
commite4849737f76c8767e70dc1575f6e59fc3682b3fe (patch)
treebe063ec6b7090febc567f37cafd4133b7c2b292b /drivers/block/loop.c
parentd03ca5820d84090f47ce831df619f2fff66eb52b (diff)
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)
1038{ 1038{
1039 int err; 1039 int err;
1040 struct loop_func_table *xfer; 1040 struct loop_func_table *xfer;
1041 uid_t uid = current_uid(); 1041 kuid_t uid = current_uid();
1042 1042
1043 if (lo->lo_encrypt_key_size && 1043 if (lo->lo_encrypt_key_size &&
1044 lo->lo_key_owner != uid && 1044 !uid_eq(lo->lo_key_owner, uid) &&
1045 !capable(CAP_SYS_ADMIN)) 1045 !capable(CAP_SYS_ADMIN))
1046 return -EPERM; 1046 return -EPERM;
1047 if (lo->lo_state != Lo_bound) 1047 if (lo->lo_state != Lo_bound)