From ac26b3dc3290cf2d7f4bd8e70a6fc3e5bfa01c54 Mon Sep 17 00:00:00 2001 From: girish Date: Wed, 27 Aug 2008 12:36:04 +0000 Subject: [PATCH] Consider the type while finding min. --- lustre/mdt/mdt_lproc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lustre/mdt/mdt_lproc.c b/lustre/mdt/mdt_lproc.c index dd8c18a..ffb2c41 100644 --- a/lustre/mdt/mdt_lproc.c +++ b/lustre/mdt/mdt_lproc.c @@ -192,8 +192,8 @@ static int lprocfs_wr_identity_upcall(struct file *file, const char *buffer, return -EINVAL; } - if (copy_from_user(kernbuf, buffer, - min(count, UC_CACHE_UPCALL_MAXPATH - 1))) + if (copy_from_user(kernbuf, buffer, min_t(unsigned long, count, + UC_CACHE_UPCALL_MAXPATH - 1))) return -EFAULT; /* Remove any extraneous bits from the upcall (e.g. linefeeds) */ -- 1.8.3.1