lkml.org 
[lkml]   [2013]   [Jan]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] tmpfs mempolicy: fix /proc/mounts corrupting memory
On Wed, 2 Jan 2013, Hugh Dickins wrote:

> @@ -2756,13 +2747,13 @@ out:
> * @buffer: to contain formatted mempolicy string
> * @maxlen: length of @buffer
> * @pol: pointer to mempolicy to be formatted
> - * @no_context: "context free" mempolicy - use nodemask in w.user_nodemask
> + * @unused: redundant argument, to be removed later.
> *
> * Convert a mempolicy into a string.
> * Returns the number of characters in buffer (if positive)
> * or an error (negative)
> */
> -int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol, int no_context)
> +int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol, int unused)
> {
> char *p = buffer;
> int l;
> @@ -2796,10 +2787,7 @@ int mpol_to_str(char *buffer, int maxlen
> case MPOL_BIND:
> /* Fall through */
> case MPOL_INTERLEAVE:
> - if (no_context)
> - nodes = pol->w.user_nodemask;
> - else
> - nodes = pol->v.nodes;
> + nodes = pol->v.nodes;
> break;
>

no_context was always true. Why is the code from the false branch kept?


\
 
 \ /
  Last update: 2013-01-02 17:41    [W:0.079 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site