From: Olof Johansson <olof@lixom.net>
To: Trond Myklebust <Trond.Myklebust@netapp.com>,
David Howells <dhowells@redhat.com>
Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org,
Olof Johansson <olof@lixom.net>
Subject: [PATCH] NFS: Don't use debug-printk-only local variables
Date: Wed, 25 Sep 2013 22:56:48 -0700 [thread overview]
Message-ID: <1380175008-13090-1-git-send-email-olof@lixom.net> (raw)
In-Reply-To: <20130920150927.16220.33305.stgit@warthog.procyon.org.uk>
Due to commit 996a2493ed5d3a8d5db03b560fcbbf1ca3f10897 (NFS:
Use i_writecount to control whether to get an fscache cookie in
nfs_open(), in two instances a local variable is only used in debug
print statements. Said statements might be compiled out, which results
in unused variable warnings:
fs/nfs/fscache.c: In function 'nfs_fscache_release_page':
fs/nfs/fscache.c:263:21: warning: unused variable 'nfsi' [-Wunused-variable]
fs/nfs/fscache.c: In function '__nfs_fscache_invalidate_page':
fs/nfs/fscache.c:286:20: warning: unused variable 'nfsi' [-Wunused-variable]
Just skip the local variable in these cases.
Signed-off-by: Olof Johansson <olof@lixom.net>
---
David,
This showed up in today's linux-next, seems to have come in through the fscache tree.
Either amend and roll in the fix (after review -- I'm guessing this is the right thing to do), or apply on top please. :)
Thanks!
-Olof
fs/nfs/fscache.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/nfs/fscache.c b/fs/nfs/fscache.c
index a01af20..3ef01f0 100644
--- a/fs/nfs/fscache.c
+++ b/fs/nfs/fscache.c
@@ -260,12 +260,11 @@ EXPORT_SYMBOL_GPL(nfs_fscache_open_file);
int nfs_fscache_release_page(struct page *page, gfp_t gfp)
{
if (PageFsCache(page)) {
- struct nfs_inode *nfsi = NFS_I(page->mapping->host);
struct fscache_cookie *cookie = nfs_i_fscache(page->mapping->host);
BUG_ON(!cookie);
dfprintk(FSCACHE, "NFS: fscache releasepage (0x%p/0x%p/0x%p)\n",
- cookie, page, nfsi);
+ cookie, page, NFS_I(page->mapping->host));
if (!fscache_maybe_release_page(cookie, page, gfp))
return 0;
@@ -283,13 +282,12 @@ int nfs_fscache_release_page(struct page *page, gfp_t gfp)
*/
void __nfs_fscache_invalidate_page(struct page *page, struct inode *inode)
{
- struct nfs_inode *nfsi = NFS_I(inode);
struct fscache_cookie *cookie = nfs_i_fscache(inode);
BUG_ON(!cookie);
dfprintk(FSCACHE, "NFS: fscache invalidatepage (0x%p/0x%p/0x%p)\n",
- cookie, page, nfsi);
+ cookie, page, NFS_I(inode));
fscache_wait_on_page_write(cookie, page);
--
1.7.10.4
next prev parent reply other threads:[~2013-09-26 5:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-20 15:09 [RFC][PATCH 0/3] FS-Cache: NFS(/CIFS/Ceph/9P): Fix start-caching whilst writing race David Howells
2013-09-20 15:09 ` [PATCH 1/3] FS-Cache: Add use/unuse/wake cookie wrappers David Howells
2013-09-20 15:09 ` [PATCH 2/3] FS-Cache: Provide the ability to enable/disable cookies David Howells
2013-09-20 15:09 ` [PATCH 3/3] NFS: Use i_writecount to control whether to get an fscache cookie in nfs_open() David Howells
2013-09-26 5:56 ` Olof Johansson [this message]
2013-09-26 11:24 ` [PATCH] NFS: Don't use debug-printk-only local variables David Howells
2013-09-26 12:39 ` David Howells
2013-09-23 17:00 ` [RFC][PATCH 0/3] FS-Cache: NFS(/CIFS/Ceph/9P): Fix start-caching whilst writing race Milosz Tanski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1380175008-13090-1-git-send-email-olof@lixom.net \
--to=olof@lixom.net \
--cc=Trond.Myklebust@netapp.com \
--cc=dhowells@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).