Re: [patch 2/6] vfs: pnode cleanup

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

 



> On Thu, Mar 13, 2008 at 10:26:43PM +0100, Miklos Szeredi wrote:
> > Move set_mnt_shared from pnode.h to pnode.c.  Change
> > CLEAR_MNT_SHARED() to clear_mnt_shared() function, and move to
> > pnode.c.
> 
> I don't see why these two are a cleanup, actually.

People don't like my cleanups :( sniff...

> > @@ -89,20 +100,18 @@ static int do_make_slave(struct vfsmount
> >  		list_for_each_entry(slave_mnt, &mnt->mnt_slave_list, mnt_slave)
> >  			slave_mnt->mnt_master = master;
> >  		list_move(&mnt->mnt_slave, &master->mnt_slave_list);
> > -		list_splice(&mnt->mnt_slave_list, master->mnt_slave_list.prev);
> > -		INIT_LIST_HEAD(&mnt->mnt_slave_list);
> > +		list_splice_init(&mnt->mnt_slave_list,
> > +				 master->mnt_slave_list.prev);
> 
> Umm...  OK.

Yeah, not much of an improvement.

> >  	} else {
> > -		struct list_head *p = &mnt->mnt_slave_list;
> > -		while (!list_empty(p)) {
> > -                        slave_mnt = list_first_entry(p,
> > +		while (!list_empty(&mnt->mnt_slave_list)) {
> > +			slave_mnt = list_first_entry(&mnt->mnt_slave_list,
> 
> How is that better?

I find it easier to read.  Renaming "p" to "slaves" would also have
been better.  Single letter variables are reserved for iterators in my
mind...

Miklos
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux