Skip to contentSkip to conversation

mm: simplify reclaim path for MADV_FREE

DISCUSSION Dan Carpenter 2 participants 2 messages Oct 21, 2015 – Oct 22, 2015 Memory management

lore
Share & tools
lore
#0 lore raw

Hello Minchan Kim,

The patch e4f28388eb72: "mm: simplify reclaim path for MADV_FREE" from Oct 21, 2015, leads to the following static checker warning:

	mm/rmap.c:1469 try_to_unmap_one()
	warn: inconsistent indenting

mm/rmap.c
1459 /*

  1460                   * Store the swap location in the pte.
  1461                   * See handle_pte_fault() ...
  1462                   */
  1463                  VM_BUG_ON_PAGE(!PageSwapCache(page), page);
  1464                  if (swap_duplicate(entry) < 0) {
  1465                          set_pte_at(mm, address, pte, pteval);
  1466                          ret = SWAP_FAIL;
  1467                          goto out_unmap;

1468 }
1469 if (!PageDirty(page))
1470 SetPageDirty(page);

My guess is that we can just remove the extra tabs. It wasn't supposed to be before the "goto out_unmap;" was it?

  1471                  if (list_empty(&mm->mmlist)) {
  1472                          spin_lock(&mmlist_lock);
  1473                          if (list_empty(&mm->mmlist))
  1474                                  list_add(&mm->mmlist, &init_mm.mmlist);
  1475                          spin_unlock(&mmlist_lock);
  1476                  }

regards,
dan carpenter

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#1 lore raw
Quoted 18 lines · Dan Carpenter

Hello Minchan Kim,

The patch e4f28388eb72: "mm: simplify reclaim path for MADV_FREE" from Oct 21, 2015, leads to the following static checker warning:

	mm/rmap.c:1469 try_to_unmap_one()
	warn: inconsistent indenting

mm/rmap.c
1459 /*

  1460                   * Store the swap location in the pte.
  1461                   * See handle_pte_fault() ...
  1462                   */
  1463                  VM_BUG_ON_PAGE(!PageSwapCache(page), page);
  1464                  if (swap_duplicate(entry) < 0) {
  1465                          set_pte_at(mm, address, pte, pteval);
  1466                          ret = SWAP_FAIL;
  1467                          goto out_unmap;
Quoted 6 lines

1468 }
1469 if (!PageDirty(page))
1470 SetPageDirty(page);

My guess is that we can just remove the extra tabs. It wasn't supposed to be before the "goto out_unmap;" was it?

Thanks for the report, Dan.
Thanks for the quick fix, Andrew.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>