From: Dave Hansen <haveblue@us.ibm.com>
To: Daniel Walker <dwalker@mvista.com>
Cc: linux-kernel@vger.kernel.org, hch@lst.de, mark.fasheh@oracle.com,
viro@zeniv.linux.org.uk
Subject: Re: + r-o-bind-mount-clean-up-ocfs2-nlink-handling.patch added to -mm tree
Date: Thu, 10 Aug 2006 09:02:37 -0700 [thread overview]
Message-ID: <1155225757.19249.232.camel@localhost.localdomain> (raw)
In-Reply-To: <1155218195.16579.3.camel@c-67-188-28-158.hsd1.ca.comcast.net>
On Thu, 2006-08-10 at 06:56 -0700, Daniel Walker wrote:
> On Wed, 2006-08-09 at 12:12 -0700, akpm@osdl.org wrote:
> > - /* We can set nlink on the dinode now. clear the saved version
> > - * so that it doesn't get set later. */
> > + if (S_ISDIR(inode->i_mode))
> > + drop_nlink(inode);
> > + drop_nlink(inode);
> > fe->i_links_count = cpu_to_le16(inode->i_nlink);
> > - saved_nlink = 0;
> >
> > status = ocfs2_journal_dirty(handle, fe_bh);
>
> There's one too many drop_nlink()'s in this block, unless I'm not
> reading this right.
It needs to be double-dropped for any directory inodes. Some of the
older code just did i_nlink-=2, and I chose to just call drop_nlink()
twice instead of making another helper to do arbitrary arithmetic on
i_nlink.
I believe this made up for the
if (S_ISDIR(inode->i_mode))
inode->i_nlink = 0;
in the old code.
-- Dave
next prev parent reply other threads:[~2006-08-10 16:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200608091912.k79JCnGh027465@shell0.pdx.osdl.net>
2006-08-10 13:56 ` + r-o-bind-mount-clean-up-ocfs2-nlink-handling.patch added to -mm tree Daniel Walker
2006-08-10 16:02 ` Dave Hansen [this message]
2006-08-10 16:07 ` Daniel Walker
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=1155225757.19249.232.camel@localhost.localdomain \
--to=haveblue@us.ibm.com \
--cc=dwalker@mvista.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.fasheh@oracle.com \
--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