Hi Hari,

On Tue, Apr 7, 2009 at 11:27 PM, Kanigeri, Hari <[email protected]> wrote:
> Ameya,
>
>> If this is the case then what is the point of having following code?
>> if (page_count(pg) < 1)  <-- This will always evaluate to FALSE.
>
> -- As you mentioned this case shouldn't be hit. This check is to only to 
> ensure that the >translations from user space VA to Physical address is 
> taking place correctly and flag the >user if something went bad.

get_page() function has following check inside it:
VM_BUG_ON(atomic_read(&page->_count) == 0);

Why we need to repeat it again?
I guess we can completely remove following check which is in my
opinion completely
redundant:

if (page_count(pg) < 1) {
}

Cheers,
Ameya.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to