diff for duplicates of <1493157929.3209.113.camel@linux.intel.com> diff --git a/a/1.txt b/N1/1.txt index bcd77bd..1fc49e3 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -5,9 +5,9 @@ On Tue, 2017-04-25 at 14:37 -0700, Andrew Morton wrote: > > From: Huang Ying <ying.huang@intel.com> > > > > In swapcache_free_entries(), if swap_info_get_cont() return NULL, -> > something wrong occurs for the swap entry.A A But we should still +> > something wrong occurs for the swap entry. But we should still > > continue to free the following swap entries in the array instead of -> > skip them to avoid swap space leak.A A This is just problem in error +> > skip them to avoid swap space leak. This is just problem in error > > path, where system may be in an inconsistent state, but it is still > > good to fix it. > > @@ -16,36 +16,30 @@ On Tue, 2017-04-25 at 14:37 -0700, Andrew Morton wrote: > > --- a/mm/swapfile.c > > +++ b/mm/swapfile.c > > @@ -1079,8 +1079,6 @@ void swapcache_free_entries(swp_entry_t *entries, int n) -> > A p = swap_info_get_cont(entries[i], prev); -> > A if (p) -> > A swap_entry_free(p, entries[i]); +> > p = swap_info_get_cont(entries[i], prev); +> > if (p) +> > swap_entry_free(p, entries[i]); > > - else > > - break; -> > A prev = p; -> So now prev==NULL.A A Will this code get the locking correct in -> swap_info_get_cont()?A A I think so, but please double-check. +> > prev = p; +> So now prev==NULL. Will this code get the locking correct in +> swap_info_get_cont()? I think so, but please double-check. > There are 4 possible cases, and I checked that the logic in swap_info_get_cont do the expected: entries[i] -valid? prev A Expected swap_info_get_cont behavior +valid? prev Expected swap_info_get_cont behavior --------------------------------------------------------------------- NO NULL Return NULL p, Do nothing on lock/unlock -NO NON-NULL Return NULL p, Unlock prevA +NO NON-NULL Return NULL p, Unlock prev YES NULL Return non-NULL p, lock p -YES NON-NULL Return non-NULL p, (p != prev) unlock prev and lock pA - A A (p == prev) do nothing on lock/unlock +YES NON-NULL Return non-NULL p, (p != prev) unlock prev and lock p + (p == prev) do nothing on lock/unlock Thanks. Tim -> - --- -To unsubscribe, send a message with 'unsubscribe linux-mm' in -the body to majordomo@kvack.org. For more info on Linux MM, -see: http://www.linux-mm.org/ . -Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> +> diff --git a/a/content_digest b/N1/content_digest index 1b0416a..89f1a14 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -22,9 +22,9 @@ "> > From: Huang Ying <ying.huang@intel.com>\n" "> > \n" "> > In swapcache_free_entries(), if swap_info_get_cont() return NULL,\n" - "> > something wrong occurs for the swap entry.A A But we should still\n" + "> > something wrong occurs for the swap entry.\302\240\302\240But we should still\n" "> > continue to free the following swap entries in the array instead of\n" - "> > skip them to avoid swap space leak.A A This is just problem in error\n" + "> > skip them to avoid swap space leak.\302\240\302\240This is just problem in error\n" "> > path, where system may be in an inconsistent state, but it is still\n" "> > good to fix it.\n" "> > \n" @@ -33,38 +33,32 @@ "> > --- a/mm/swapfile.c\n" "> > +++ b/mm/swapfile.c\n" "> > @@ -1079,8 +1079,6 @@ void swapcache_free_entries(swp_entry_t *entries, int n)\n" - "> > A \t\tp = swap_info_get_cont(entries[i], prev);\n" - "> > A \t\tif (p)\n" - "> > A \t\t\tswap_entry_free(p, entries[i]);\n" + "> > \302\240\t\tp = swap_info_get_cont(entries[i], prev);\n" + "> > \302\240\t\tif (p)\n" + "> > \302\240\t\t\tswap_entry_free(p, entries[i]);\n" "> > -\t\telse\n" "> > -\t\t\tbreak;\n" - "> > A \t\tprev = p;\n" - "> So now prev==NULL.A A Will this code get the locking correct in\n" - "> swap_info_get_cont()?A A I think so, but please double-check.\n" + "> > \302\240\t\tprev = p;\n" + "> So now prev==NULL.\302\240\302\240Will this code get the locking correct in\n" + "> swap_info_get_cont()?\302\240\302\240I think so, but please double-check.\n" "> \n" "\n" "There are 4 possible cases, and I checked that the logic\n" "in swap_info_get_cont do the expected:\n" "\n" "entries[i]\n" - "valid?\t\tprev\tA \tExpected swap_info_get_cont behavior\n" + "valid?\t\tprev\t\302\240\tExpected swap_info_get_cont behavior\n" "---------------------------------------------------------------------\n" "NO\t\tNULL\t\tReturn NULL p, Do nothing on lock/unlock\n" - "NO\t\tNON-NULL\tReturn NULL p, Unlock prevA \n" + "NO\t\tNON-NULL\tReturn NULL p, Unlock prev\302\240\n" "YES\t\tNULL\t\tReturn non-NULL p, lock p\n" - "YES\t\tNON-NULL\tReturn non-NULL p, (p != prev) unlock prev and lock pA \n" - "\t\t\t\t\t\tA A (p == prev) do nothing on lock/unlock\n" + "YES\t\tNON-NULL\tReturn non-NULL p, (p != prev) unlock prev and lock p\302\240\n" + "\t\t\t\t\t\t\302\240 \302\240(p == prev) do nothing on lock/unlock\n" "\n" "Thanks.\n" "\n" "Tim\n" "\n" - "> \n" - "\n" - "--\n" - "To unsubscribe, send a message with 'unsubscribe linux-mm' in\n" - "the body to majordomo@kvack.org. For more info on Linux MM,\n" - "see: http://www.linux-mm.org/ .\n" - "Don't email: <a href=mailto:\"dont@kvack.org\"> email@kvack.org </a>" + > -a4c77499182d46b97db463d4a63d0ecab6b9214b3656b789a79aabc65ae52b2c +9b74db53a9314b2fdf472813de7a5804075be2223b66fa3fa40058abd13f2e81
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.