On Tue 20-11-18 15:26:43, David Hildenbrand wrote:
[...]
> > +   do {
> > +           for (pfn = start_pfn; pfn;)
> > +           {
> 
> { on a new line looks weird.
> 
> > +                   /* start memory hot removal */
> > +                   ret = -EINTR;
> 
> I think we can move that into the "if (signal_pending(current))"
> 
> (if my eyes are not wrong, this will not be touched otherwise)

Better?

diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index 9cd161db3061..6bc3aee30f5e 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -1592,11 +1592,10 @@ static int __ref __offline_pages(unsigned long 
start_pfn,
        }
 
        do {
-               for (pfn = start_pfn; pfn;)
-               {
+               for (pfn = start_pfn; pfn;) {
                        /* start memory hot removal */
-                       ret = -EINTR;
                        if (signal_pending(current)) {
+                               ret = -EINTR;
                                reason = "signal backoff";
                                goto failed_removal_isolated;
                        }
-- 
Michal Hocko
SUSE Labs

Reply via email to