A question of "cond_resched_lock" called in atomic context

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

 



I have seen some drivers or file systems calls "cond_resched_lock" when holding a spinlock.
An example is in fs/ocfs2/dlm/dlmdomain.c:
dlm_migrate_all_locks (acquire the spinlock)
  cond_resched_lock

I find that "cond_resched_lock" has two functions: "___might_sleep" and "__cond_resched_lock". I know that "__cond_resched_lock" is safe and okay to be called when holding a spinlock. However, I think "___might_sleep" can be removed, because it prints error messages in this situation, but it is safe in fact.

Am I right? I am looking forward to your comments :)


Thanks,
Jia-Ju Bai






[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