On 05/15, Jan Kara wrote: > > Now this behavior upsets lockdep and that's why we fool it by telling the > semaphore got released before returning to userspace (through > percpu_rwsem_release() helper) and similarly we tell lockdep we've got the > semaphore when an unfreeze syscall is called by percpu_rwsem_acquire(). Now > Amir has discovered that also rwsem debugging code gets confused by this > behavior Yes, plus someone else has already reported the problem a month ago, > and previously also someone noticed that rwsem spinning does not > make sense and can be broken by this behavior. Well, this doesn't really matter but again, freeze_super() checks frozen == SB_UNFROZEN under sb->s_umount and only then does sb_wait_write(), when the previous writer has already realeased this lock. So the new writer will never spin after lockdep_sb_freeze_release() clears ->owner. Oleg.