linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
  • [parent not found: <55D52CDE.8060700@hotmail.com>]
  • * Re: [PATCH] mm: mmap: Simplify the failure return working flow
    @ 2015-08-23 16:28 gang.chen.5i5j
      0 siblings, 0 replies; 9+ messages in thread
    From: gang.chen.5i5j @ 2015-08-23 16:28 UTC (permalink / raw)
      To: Michal Hocko
      Cc: gang.chen.5i5j, Chen Gang, Andrew Morton, kernel mailing list,
    	Kirill A. Shutemov, riel@redhat.com, sasha.levin@oracle.com,
    	Linux Memory
    
    On 8/20/15 15:45, Michal Hocko wrote:
    > On Thu 20-08-15 09:27:42, gchen gchen wrote:
    > [...]
    >> Yes, it is really peculiar, the reason is gmail is not stable in China.
    >> I have to send mail in my hotmail address.
    >>
    >> But I still want to use my gmail as Signed-off-by, since I have already
    >> used it, and also its name is a little formal than my hotmail.
    >>
    >> Welcome any ideas, suggestions and completions for it (e.g. if it is
    >> necessary to let send mail and Signed-off-by mail be the same, I shall
    >> try).
    > 
    > You can do the following in your .git/config
    > 
    > [user]
    > 	name = YOUR_NAME_FOR_S-O-B
    > 	email = YOUR_GMAIL_ADDRESS
    > [sendemail]
    > 	from = YOUR_STABLE_SENDER_ADDRESS
    
    After trying, I guess, from = YOUR_GMAIL_ADDRESS
    
    > 	envelopesender = YOUR_STABLE_SENDER_ADDRESS
    > 	smtpserver = YOUR_STABLE_SMTP
    > 
    > [user] part will be used for s-o-b and Author email while the sendemail
    > will be used for git send-email to route the patch properly. If the two
    > differ it will add From: user.name <user.email> as suggested by Andrew.
    > 
    
    OK, thanks. I finished the configuration, and give a test (send and
    receive test mail between my 2 mail address), it is OK.
    
    I shall send patches in this way :-).
    
    Thanks.
    -- 
    Chen Gang
    
    Open, share, and attitude like air, water, and life which God blessed
    
    --
    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>
    
    ^ permalink raw reply	[flat|nested] 9+ messages in thread
    * Re: [PATCH] mm: mmap: Simplify the failure return working flow
    @ 2015-08-23 16:20 gang.chen.5i5j
      0 siblings, 0 replies; 9+ messages in thread
    From: gang.chen.5i5j @ 2015-08-23 16:20 UTC (permalink / raw)
      To: Michal Hocko
      Cc: Andrew Morton, kernel mailing list, Kirill A. Shutemov,
    	riel@redhat.com, sasha.levin@oracle.com, Linux Memory
    
    After trying, I guess, from = YOUR_GMAIL_ADDRESS
    
    > 	envelopesender = YOUR_STABLE_SENDER_ADDRESS
    > 	smtpserver = YOUR_STABLE_SMTP
    > 
    > [user] part will be used for s-o-b and Author email while the sendemail
    > will be used for git send-email to route the patch properly. If the two
    > differ it will add From: user.name <user.email> as suggested by Andrew.
    > 
    
    OK, thanks. I finished the configuration, and give a test (send and
    receive test mail between my 2 mail address), it is OK.
    
    I shall send patches in this way :-).
    
    Thanks.
    -- 
    Chen Gang
    
    Open, share, and attitude like air, water, and life which God blessed
    
    
    
    --
    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>
    
    ^ permalink raw reply	[flat|nested] 9+ messages in thread
    * [PATCH] mm: mmap: Simplify the failure return working flow
    @ 2015-08-18 22:27 Chen Gang
      2015-08-18 22:57 ` Andrew Morton
      0 siblings, 1 reply; 9+ messages in thread
    From: Chen Gang @ 2015-08-18 22:27 UTC (permalink / raw)
      To: Andrew Morton, Kirill A. Shutemov, riel, Michal Hocko,
    	sasha.levin
      Cc: linux-mm, linux-kernel@vger.kernel.org
    
    __split_vma() doesn't need out_err label, neither need initializing err.
    
    copy_vma() can return NULL directly when kmem_cache_alloc() fails.
    
    Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
    ---
     mm/mmap.c | 39 +++++++++++++++++++--------------------
     1 file changed, 19 insertions(+), 20 deletions(-)
    
    diff --git a/mm/mmap.c b/mm/mmap.c
    index 8e0366e..35a4376 100644
    --- a/mm/mmap.c
    +++ b/mm/mmap.c
    @@ -2461,7 +2461,7 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
     	      unsigned long addr, int new_below)
     {
     	struct vm_area_struct *new;
    -	int err = -ENOMEM;
    +	int err;
     
     	if (is_vm_hugetlb_page(vma) && (addr &
     					~(huge_page_mask(hstate_vma(vma)))))
    @@ -2469,7 +2469,7 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
     
     	new = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL);
     	if (!new)
    -		goto out_err;
    +		return -ENOMEM;
     
     	/* most fields are the same, copy all, and then fixup */
     	*new = *vma;
    @@ -2517,7 +2517,6 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
     	mpol_put(vma_policy(new));
      out_free_vma:
     	kmem_cache_free(vm_area_cachep, new);
    - out_err:
     	return err;
     }
     
    @@ -2958,23 +2957,23 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
     		*need_rmap_locks = (new_vma->vm_pgoff <= vma->vm_pgoff);
     	} else {
     		new_vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL);
    -		if (new_vma) {
    -			*new_vma = *vma;
    -			new_vma->vm_start = addr;
    -			new_vma->vm_end = addr + len;
    -			new_vma->vm_pgoff = pgoff;
    -			if (vma_dup_policy(vma, new_vma))
    -				goto out_free_vma;
    -			INIT_LIST_HEAD(&new_vma->anon_vma_chain);
    -			if (anon_vma_clone(new_vma, vma))
    -				goto out_free_mempol;
    -			if (new_vma->vm_file)
    -				get_file(new_vma->vm_file);
    -			if (new_vma->vm_ops && new_vma->vm_ops->open)
    -				new_vma->vm_ops->open(new_vma);
    -			vma_link(mm, new_vma, prev, rb_link, rb_parent);
    -			*need_rmap_locks = false;
    -		}
    +		if (!new_vma)
    +			return NULL;
    +		*new_vma = *vma;
    +		new_vma->vm_start = addr;
    +		new_vma->vm_end = addr + len;
    +		new_vma->vm_pgoff = pgoff;
    +		if (vma_dup_policy(vma, new_vma))
    +			goto out_free_vma;
    +		INIT_LIST_HEAD(&new_vma->anon_vma_chain);
    +		if (anon_vma_clone(new_vma, vma))
    +			goto out_free_mempol;
    +		if (new_vma->vm_file)
    +			get_file(new_vma->vm_file);
    +		if (new_vma->vm_ops && new_vma->vm_ops->open)
    +			new_vma->vm_ops->open(new_vma);
    +		vma_link(mm, new_vma, prev, rb_link, rb_parent);
    +		*need_rmap_locks = false;
     	}
     	return new_vma;
     
    -- 
    1.9.3
    
    --
    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>
    
    ^ permalink raw reply related	[flat|nested] 9+ messages in thread

    end of thread, other threads:[~2015-08-23 17:28 UTC | newest]
    
    Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
    -- links below jump to the message on this page --
         [not found] <55D5275D.7020406@hotmail.com>
         [not found] ` <COL130-W46B6A43FC26795B43939E0B9660@phx.gbl>
         [not found]   ` <55D52C9A.5060705@hotmail.com>
    2015-08-20  1:26     ` [PATCH] mm: mmap: Simplify the failure return working flow gchen gchen
         [not found]   ` <55D52CDE.8060700@hotmail.com>
    2015-08-20  1:27     ` gchen gchen
    2015-08-20  7:45       ` Michal Hocko
         [not found]         ` <55D593C2.3040105@hotmail.com>
    2015-08-20  8:48           ` gchen gchen
    2015-08-23 17:28             ` Chen Gang
    2015-08-23 16:28 gang.chen.5i5j
      -- strict thread matches above, loose matches on Subject: below --
    2015-08-23 16:20 gang.chen.5i5j
    2015-08-18 22:27 Chen Gang
    2015-08-18 22:57 ` Andrew Morton
    

    This is a public inbox, see mirroring instructions
    for how to clone and mirror all data and code used for this inbox;
    as well as URLs for NNTP newsgroup(s).