Re: [PATCH v2] fs/dcache.c: avoid soft-lockup in dput()

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

 



Hi, Boqun,

>> diff --git a/fs/dcache.c b/fs/dcache.c
>> index d5ecc6e..074fc1c 100644
>> --- a/fs/dcache.c
>> +++ b/fs/dcache.c
>> @@ -578,7 +578,7 @@ static struct dentry *dentry_kill(struct dentry *dentry)
>>  
>>  failed:
>>  	spin_unlock(&dentry->d_lock);
>> -	cpu_relax();
>> +	cond_resched();
> 
> Is it better to put the cond_resched() in the caller(i.e. dput()), right
> before "goto repeat"? Because it's obviously a loop there, which makes
> the purpose of cond_resched() more straightforward.

Agreed, that's more reasonable. I'll send v3 soon.

Thanks,
Wei

--
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