Re: [PATCH 04/28] OCFS2 is screwy

Mark Fasheh
2006-08-02T04:34:46Z

Hi Dave,

On Tue, Aug 01, 2006 at 08:21:46PM -0700, Dave Hansen wrote:
> Please ignore that last one. It didn't correctly handle directories'
> with a remaining i_nlink of 2.
Thanks for following up with this patch - it looks pretty good. One comment
below.

> @@ -888,7 +890,9 @@
> /* We can set nlink on the dinode now. clear the saved version
> * so that it doesn't get set later. */
> fe->i_links_count = cpu_to_le16(inode->i_nlink);
> - saved_nlink = 0;
> + inode_drop_nlink(inode);
> + if (S_ISDIR(inode->i_mode))
> + inode_drop_nlink(inode);
The set of 'i_links_count' on 'fe' should be below the inode_drop_nlink()
calls - otherwise we'll be setting the old nlink value on the disk inode :)

While you're there you can just remove that comment - it's no longer
accurate :)

Thanks again,
--Mark

--
Mark Fasheh
Senior Software Developer, Oracle
mark.fasheh@oracle.com