public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Wanlong Gao <gaowanlong@cn.fujitsu.com>
To: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fs:remove a no needed mutex_unlock in devtmpfs
Date: Fri, 29 Jul 2011 17:02:25 +0800	[thread overview]
Message-ID: <4E327721.1080605@cn.fujitsu.com> (raw)
In-Reply-To: <1311928444-4848-1-git-send-email-gaowanlong@cn.fujitsu.com>

On 07/29/2011 04:34 PM, Wanlong Gao wrote:
> According ed75e95de574c99575e5f3e1d9ca59ea8c12a9cb, Al killed the
> lookup_create(), this function will return with an mutex locked,
> and it called by dev_mkdir() previously. then unlock this mutex
> in dev_mkdir(), but when lookup_create() is replaced by kern_path_create(),
> no locked mutex returned, so no need to unlock the mutex.
>
> Al, is it right?
> Thanks
Sorry, kern_path_create() also held a mutex, I made a mistake.
Thanks
>
> Signed-off-by: Wanlong Gao<gaowanlong@cn.fujitsu.com>
> ---
>   drivers/base/devtmpfs.c |    1 -
>   1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c
> index b89fffc..5384883 100644
> --- a/drivers/base/devtmpfs.c
> +++ b/drivers/base/devtmpfs.c
> @@ -157,7 +157,6 @@ static int dev_mkdir(const char *name, mode_t mode)
>   		/* mark as kernel-created inode */
>   		dentry->d_inode->i_private =&thread;
>   	dput(dentry);
> -	mutex_unlock(&path.dentry->d_inode->i_mutex);
>   	path_put(&path);
>   	return err;
>   }


-- 
Thanks
Best Regards
Wanlong Gao

  reply	other threads:[~2011-07-29  9:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-29  8:34 [PATCH] fs:remove a no needed mutex_unlock in devtmpfs Wanlong Gao
2011-07-29  9:02 ` Wanlong Gao [this message]
2011-07-29  9:03 ` Li Zefan
2011-07-29  9:06   ` Wanlong Gao

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=4E327721.1080605@cn.fujitsu.com \
    --to=gaowanlong@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox