All of lore.kernel.org
 help / color / mirror / Atom feed
From: Goldwyn Rodrigues <rgoldwyn@suse.de>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 1/6] Add clustername to cluster connection
Date: Sun, 03 Nov 2013 21:43:25 -0600	[thread overview]
Message-ID: <527717DD.1010200@suse.de> (raw)
In-Reply-To: <20131103220937.GG29346@wotan.suse.de>

On 11/03/2013 04:09 PM, Mark Fasheh wrote:
> On Fri, Oct 18, 2013 at 09:45:12AM -0500, Goldwyn Rodrigues wrote:
>> diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
>> index 121da2d..c30ad6b 100644
>> --- a/fs/ocfs2/super.c
>> +++ b/fs/ocfs2/super.c
>> @@ -2225,9 +2225,9 @@ static int ocfs2_initialize_super(struct super_block *sb,
>>   	if (ocfs2_clusterinfo_valid(osb)) {
>>   		osb->osb_stackflags =
>>   			OCFS2_RAW_SB(di)->s_cluster_info.ci_stackflags;
>> -		memcpy(osb->osb_cluster_stack,
>> +		strlcpy(osb->osb_cluster_stack,
>>   		       OCFS2_RAW_SB(di)->s_cluster_info.ci_stack,
>> -		       OCFS2_STACK_LABEL_LEN);
>> +		       OCFS2_STACK_LABEL_LEN + 1);
>>   		osb->osb_cluster_stack[OCFS2_STACK_LABEL_LEN] = '\0';
>
> I don't think we want to NULL terminate like this any more, right?
>

Right. strlcpy() does the NULL termination for us.

> Otherwise the rest of this looks reasonable to me.
> 	--Mark
>
> --
> Mark Fasheh
>


-- 
Goldwyn

  reply	other threads:[~2013-11-04  3:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-18 14:45 [Ocfs2-devel] [PATCH 1/6] Add clustername to cluster connection Goldwyn Rodrigues
2013-11-03 22:09 ` Mark Fasheh
2013-11-04  3:43   ` Goldwyn Rodrigues [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-11-12 14:06 Goldwyn Rodrigues
2013-11-18 23:39 ` Mark Fasheh
2013-12-09 19:40 Goldwyn Rodrigues

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=527717DD.1010200@suse.de \
    --to=rgoldwyn@suse.de \
    --cc=ocfs2-devel@oss.oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.