mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Jianyu Zhan <nasa4836@gmail.com>
Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kernfs: fix a subdir count leak
Date: Thu, 17 Apr 2014 09:19:18 -0400	[thread overview]
Message-ID: <20140417131918.GI26632@htj.dyndns.org> (raw)
In-Reply-To: <1397728330-11099-1-git-send-email-nasa4836@gmail.com>

On Thu, Apr 17, 2014 at 05:52:10PM +0800, Jianyu Zhan wrote:
> Currently kernfs_link_sibling() increates parent->dir.subdirs before
> adding the node into parent's chidren rb tree.
> 
> Because it is possible that kernfs_link_sibling() couldn't find
> a suitable slot and bail out, this leads to a mismatch between
> elevated subdir count with actual children node numbers.
> 
> This patches fix this problem, by moving the subdir accouting
> after the actual addtion happening.
> 
> Signed-off-by: Jianyu Zhan <nasa4836@gmail.com>

Acked-by: Tejun Heo <tj@kernel.org>

Thanks.

-- 
tejun

      reply	other threads:[~2014-04-17 13:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-17  9:52 Jianyu Zhan
2014-04-17 13:19 ` Tejun Heo [this message]

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=20140417131918.GI26632@htj.dyndns.org \
    --to=tj@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nasa4836@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®