[Linux-cachefs] [PATCH 1/1] fs/cachefiles: fix sparse context imbalance warning

Fabian Frederick fabf at skynet.be
Thu Sep 18 17:38:47 UTC 2014


Annotate cachefiles_uncache_page to avoid the following sparse warning:
fs/cachefiles/rdwr.c:972:20: warning: context imbalance in 'cachefiles_uncache_page' - unexpected unlock

Signed-off-by: Fabian Frederick <fabf at skynet.be>
---
 fs/cachefiles/rdwr.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/cachefiles/rdwr.c b/fs/cachefiles/rdwr.c
index 616db0e7..ee52f4c 100644
--- a/fs/cachefiles/rdwr.c
+++ b/fs/cachefiles/rdwr.c
@@ -953,6 +953,7 @@ int cachefiles_write_page(struct fscache_storage *op, struct page *page)
  * - cache withdrawal is prevented by the caller
  */
 void cachefiles_uncache_page(struct fscache_object *_object, struct page *page)
+	__releases(&object->fscache.cookie->lock)
 {
 	struct cachefiles_object *object;
 	struct cachefiles_cache *cache;
-- 
1.9.1




More information about the Linux-cachefs mailing list