Re: [PATCH 07/17] fs: icache atomic inodes_stat

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

 



On Thu, 30 Sep 2010 16:20:57 +1000 Dave Chinner <david@xxxxxxxxxxxxx> wrote:

> > > --- a/fs/fs-writeback.c
> > > +++ b/fs/fs-writeback.c
> > > @@ -764,7 +764,8 @@ static long wb_check_old_data_flush(struct bdi_writeback *wb)
> > >  	wb->last_old_flush = jiffies;
> > >  	nr_pages = global_page_state(NR_FILE_DIRTY) +
> > >  			global_page_state(NR_UNSTABLE_NFS) +
> > > -			(inodes_stat.nr_inodes - inodes_stat.nr_unused);
> > > +			(atomic_read(&inodes_stat.nr_inodes) -
> > > +			atomic_read(&inodes_stat.nr_unused));
> > 
> > race bug.
> 
> What new race?  The code has gone from using subtraction of unlocked
> counters to using subtraction of unlocked atomic counters. I can't
> see any new race condition in that transformation....

Oh.  I assumed that all the above used to happen under inode_lock.

Coz that's wot the changelog told me :)
--
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