confusing fscache path
From: Steve French <smfrench@gmail.com>
Date: 2021-07-08 18:09:47
Also in:
linux-fsdevel
From: Steve French <smfrench@gmail.com>
Date: 2021-07-08 18:09:47
Also in:
linux-fsdevel
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