confusing fscache path

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

 



Coverity complains about a double lock in fscache code and it may be
right.  Can you explain this path? Or is there a double lock bug?

line 190 of fs/cifs/fscache.c calls fscache_uncache_all_inode_pages
(which locks cifsi->fscache->lock) but then immediately calls
fscache_relinquish_cookie which locks it again.

Is Coverity ((and I) missing something?

The path from fscache_uncache_all_inode_pages is:
   fscache_uncache_all_inode_pages-->__fscache_uncache_all_inode_pages
(line 132 of fs/fscache/page.c) -->__fscache_uncache_page (locks on
line 1120 and then on line 1141 "goto done" without unlocking it)

But it gets locked again in:
    __fscache_relinquish_cookie-->__fscache_disable_cookie
    (on line 749 of fs/fscache/cookie.c)
-- 
Thanks,

Steve



[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux