All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sunil Mushran <sunil.mushran@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH] ocfs2/dlm: Fix printing of lockname
Date: Fri, 05 Feb 2010 17:14:32 -0800	[thread overview]
Message-ID: <4B6CC278.2050307@oracle.com> (raw)
In-Reply-To: <20100205235733.GJ11402@wotan.suse.de>

Mark Fasheh wrote:
> On Fri, Feb 05, 2010 at 03:41:24PM -0800, Sunil Mushran wrote:
>   
>> The debug call printing the name of the lock resource was chopping
>> off the last character. This patch fixes the problem.
>>
>> Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
>> ---
>>  fs/ocfs2/dlm/dlmdebug.c |    4 ++--
>>  1 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/fs/ocfs2/dlm/dlmdebug.c b/fs/ocfs2/dlm/dlmdebug.c
>> index f18afe9..7b4d1c1 100644
>> --- a/fs/ocfs2/dlm/dlmdebug.c
>> +++ b/fs/ocfs2/dlm/dlmdebug.c
>> @@ -97,12 +97,12 @@ void __dlm_print_one_lock_resource(struct dlm_lock_resource *res)
>>  {
>>  	struct list_head *iter2;
>>  	struct dlm_lock *lock;
>> -	char buf[DLM_LOCKID_NAME_MAX];
>> +	char buf[DLM_LOCKID_NAME_MAX+1];
>>  
>>  	assert_spin_locked(&res->spinlock);
>>  
>>  	stringify_lockname(res->lockname.name, res->lockname.len,
>> -			   buf, sizeof(buf) - 1);
>> +			   buf, sizeof(buf));
>>     
>
> I'm confused - isn't this part then increasing the value of the parameter
> by 2?
> 	--Mark
>   
1 is for luck. ;) I'll resend the patch.

  reply	other threads:[~2010-02-06  1:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-05 23:41 [Ocfs2-devel] [PATCH] ocfs2/cluster: Make o2net connect messages KERN_NOTICE Sunil Mushran
2010-02-05 23:41 ` [Ocfs2-devel] [PATCH] ocfs2/dlm: Fix printing of lockname Sunil Mushran
2010-02-05 23:57   ` Mark Fasheh
2010-02-06  1:14     ` Sunil Mushran [this message]
2010-02-05 23:52 ` [Ocfs2-devel] [PATCH] ocfs2/cluster: Make o2net connect messages KERN_NOTICE Mark Fasheh
2010-02-08 21:04 ` Joel Becker
  -- strict thread matches above, loose matches on Subject: below --
2010-02-06  1:55 [Ocfs2-devel] [PATCH] ocfs2/dlm: Fix printing of lockname Sunil Mushran
2010-02-07 23:13 ` Mark Fasheh
2010-02-08 21:05 ` Joel Becker

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=4B6CC278.2050307@oracle.com \
    --to=sunil.mushran@oracle.com \
    --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.