From: Sachin Prabhu Date: Fri, 13 Sep 2013 13:11:57 +0000 (+0100) Subject: cifs: Avoid calling unlock_page() twice in cifs_readpage() when using fscache X-Git-Tag: v3.12-rc1~2^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=466bd31bbda9e1dd2ace1d72c8de5045bf6f3bf6;p=pandora-kernel.git cifs: Avoid calling unlock_page() twice in cifs_readpage() when using fscache When reading a single page with cifs_readpage(), we make a call to fscache_read_or_alloc_page() which once done, asynchronously calls the completion function cifs_readpage_from_fscache_complete(). This completion function unlocks the page once it has been populated from cache. The module then attempts to unlock the page a second time in cifs_readpage() which leads to warning messages. In case of a successful call to fscache_read_or_alloc_page() we should skip the second unlock_page() since this will be called by the cifs_readpage_from_fscache_complete() once the page has been populated by fscache. With the modifications to cifs_readpage_worker(), we will need to re-grab the page lock in cifs_write_begin(). The problem was first noticed when testing new fscache patches for cifs. https://bugzilla.redhat.com/show_bug.cgi?id=1005737 Signed-off-by: Sachin Prabhu Reviewed-by: Jeff Layton Signed-off-by: Steve French --- Reading git-diff-tree failed