Re: [PATCH 1/2][-mm][resend] res_counter limit change support ebusy

From: Andrew Morton
Date: Tue Jul 22 2008 - 04:41:34 EST


On Mon, 14 Jul 2008 17:11:54 +0900 KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:

> +static inline int res_counter_set_limit(struct res_counter *cnt,
> + unsigned long long limit)
> +{
> + unsigned long flags;
> + int ret = -EBUSY;
> +
> + spin_lock_irqsave(&cnt->lock, flags);
> + if (cnt->usage < limit) {
> + cnt->limit = limit;
> + ret = 0;
> + }
> + spin_unlock_irqrestore(&cnt->lock, flags);
> + return ret;
> +}

Need I say it? This function is waaaaaay too large to be inlined.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/