Re: - r-o-bind-mount-clean-up-ocfs2-nlink-handling.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2006-09-13 at 11:27 -0700, Mark Fasheh wrote:
> On Tue, Sep 12, 2006 at 10:06:30PM -0700, [email protected] wrote:
> > The patch titled
> > 
> >      r/o bind mounts: clean up OCFS2 nlink handling
> > 
> > has been removed from the -mm tree.  Its filename is
> > 
> >      r-o-bind-mount-clean-up-ocfs2-nlink-handling.patch
> > 
> > This patch was dropped because git-ocfs2 changes broke it. New patch, please.
> Yep, that was very likely due to my dentry vote removal changes.
> 
> Dave, how's this one look? I guess I'll leave the same description message
> below...

I was _just_ fighting with your git tree to see what was conflicting!
You have impeccable timing.

>  static int ocfs2_unlink(struct inode *dir,
>  			struct dentry *dentry)
>  {
>  	int status;
> -	unsigned int saved_nlink = 0;
>  	struct inode *inode = dentry->d_inode;
>  	struct ocfs2_super *osb = OCFS2_SB(dir->i_sb);
>  	u64 blkno;
> @@ -813,6 +825,7 @@ static int ocfs2_unlink(struct inode *di
>  	struct buffer_head *dirent_bh = NULL;
>  	char orphan_name[OCFS2_ORPHAN_NAMELEN + 1];
>  	struct buffer_head *orphan_entry_bh = NULL;
> +	unsigned int future_nlink;
>  
>  	mlog_entry("(0x%p, 0x%p, '%.*s')\n", dir, dentry,
>  		   dentry->d_name.len, dentry->d_name.name);
> @@ -876,15 +889,10 @@ static int ocfs2_unlink(struct inode *di
>  		}
>  	}
>  
> -	/* There are still a few steps left until we can consider the
> -	 * unlink to have succeeded. Save off nlink here before
> -	 * modification so we can set it back in case we hit an issue
> -	 * before commit. */
> -	saved_nlink = inode->i_nlink;
> -	if (S_ISDIR(inode->i_mode))
> -		inode->i_nlink = 0;
> +	if (S_ISDIR(inode->i_mode) && (inode->i_nlink == 2))
> +		future_nlink = 0;
>  	else
> -		inode->i_nlink--;
> +		future_nlink = inode->i_nlink - 1;

Now that the vote call is gone, I don't think we even use future_nlink.
Can we just kill this entire section?

-- Dave

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux