Re: [RFC][PATCH 1/2] fs: use RCU for free_super() vs. __sb_start_write()

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

 



On 06/23/2015 04:09 AM, Jan Kara wrote:
>> @@ -1340,7 +1344,7 @@ int freeze_super(struct super_block *sb)
>>  			printk(KERN_ERR
>>  				"VFS:Filesystem freeze failed\n");
>>  			sb->s_writers.frozen = SB_UNFROZEN;
>> -			smp_wmb();
>> +			synchronize_rcu();
> 
> Do we really need synchronize_rcu() here? We just need to make sure write
> to sb->s_writers.frozen happens before we start waking processes...

I don't think it is necessary.  We only need to be concerned in practice
if someone could be inside a critical section when we are executing
this.  I *think* the only case that we have that really matters will be
taken care of by the _first_ synchronize_rcu().

It's definitely worth adding a comment.
--
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