public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Uli Martens <u.martens@scientific.de>
To: Jan Harkes <jaharkes@cs.cmu.edu>
Cc: Christoph Rohland <cr@sap.com>, lkml <linux-kernel@vger.kernel.org>
Subject: Re: [patch] tmpfs: incr. link-count on directory rename
Date: 14 Feb 2002 10:34:01 +0100	[thread overview]
Message-ID: <1013679241.20006.21.camel@pc-um> (raw)
In-Reply-To: <20020214061933.GA17774@mentor.odyssey.cs.cmu.edu>
In-Reply-To: <1013648840.2317.5.camel@isax>  <20020214061933.GA17774@mentor.odyssey.cs.cmu.edu>

On Thu, 2002-02-14 at 07:19, Jan Harkes wrote:
> 
> ps. shouldn't the linkcount of the old_dir get decremented too? Also you
> should only change the linkcounts when the operation completed
> successfully. i.e. something more like,
Oops, you're right, the linkcount of old_dir isn't decremented at the
moment, too. I will test your patch this evening, but I think it looks
better than mine... ;)

> --- /tmp/shmem.c.orig	Thu Feb 14 01:17:23 2002
> +++ /tmp/shmem.c	Thu Feb 14 01:18:25 2002
> @@ -1100,6 +1100,10 @@
>  		error = 0;
>  		old_dentry->d_inode->i_ctime = old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME;
>  	}
> +	if (!error && S_ISDIR(old_dentry->d_inode->i_mode)) {
> +	    old_dir->i_nlink--;
> +	    new_dir->i_nlink++;
> +	}
>  	return error;
>  }

-- 
uli martens


  reply	other threads:[~2002-02-14  9:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-14  1:07 [patch] tmpfs: incr. link-count on directory rename Uli Martens
2002-02-14  6:19 ` Jan Harkes
2002-02-14  9:34   ` Uli Martens [this message]
2002-02-19 16:39     ` Christoph Rohland

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=1013679241.20006.21.camel@pc-um \
    --to=u.martens@scientific.de \
    --cc=cr@sap.com \
    --cc=jaharkes@cs.cmu.edu \
    --cc=linux-kernel@vger.kernel.org \
    /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