mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Balbir Singh" <balbir@in.ibm.com>
To: NeilBrown <neilb@suse.de>
Cc: "Andrew Morton" <akpm@osdl.org>,
	linux-kernel@vger.kernel.org, "Jan Blunck" <jblunck@suse.de>,
	"Kirill Korotaev" <dev@openvz.org>, "Olaf Hering" <olh@suse.de>
Subject: Re: [PATCH] Fix dcache race during umount
Date: Tue, 4 Apr 2006 10:41:11 +0530	[thread overview]
Message-ID: <661de9470604032211n3ea98a99j2fce3fd8faf39081@mail.gmail.com> (raw)
In-Reply-To: <1060404010506.27391@suse.de>

> Trying again after some useful comments from Balbir.
> Note: the change to prune_dcache looks quite different now.
>
> NeilBrown
>
<snip>
>                 tmp = dentry_unused.prev;
> +               if (unlikely(sb)) {
> +                       /* Try to find a dentry for this sb, but don't try
> +                        * too hard, if they aren't near the tail they will
> +                        * be moved down again soon
> +                        */
> +                       int skip = count;
> +                       while (skip &&
> +                              tmp != &dentry_unused &&
> +                              list_entry(tmp, struct dentry, d_lru)->d_sb != sb) {
> +                               skip--;
> +                               tmp = tmp->prev;
> +                       }
> +               }

This code looks very similar to the first pass in dcache_shrink_sb().
I would prefer if we could re-use that code here, but that would
require creating a helper function by splitting the function.

Looks like a good solution to me.

Regards,
Balbir

  reply	other threads:[~2006-04-04  5:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20060404110351.27364.patches@notabene>
2006-04-04  1:05 ` NeilBrown
2006-04-04  5:11   ` Balbir Singh [this message]
2006-06-22 12:22 David Howells
2006-06-22 14:27 ` David Howells
2006-06-22 16:08 ` Jan Blunck
2006-06-22 16:44   ` Jan Blunck
2006-06-23 13:28 ` Jan Blunck
2006-06-24  5:23 ` Neil Brown
2006-06-24  9:16 ` David Howells
     [not found] <20060403133804.27986.patches@notabene>
2006-04-03  3:40 ` NeilBrown
2006-04-03 18:12   ` Balbir Singh
2006-04-04  0:59     ` Neil Brown
2006-04-04  5:02       ` Balbir Singh

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=661de9470604032211n3ea98a99j2fce3fd8faf39081@mail.gmail.com \
    --to=balbir@in.ibm.com \
    --cc=akpm@osdl.org \
    --cc=dev@openvz.org \
    --cc=jblunck@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=olh@suse.de \
    /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®