summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4filelayout.c
diff options
context:
space:
mode:
authorBryan Schumaker <bjschuma@netapp.com>2012-05-22 10:10:03 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-05-22 16:43:04 -0400
commit497826af60f812240ed5b6ba80541f7c9f2154d9 (patch)
treeb741b4f133aa89a6c6e50bf1a1704f550e59cf9d /fs/nfs/nfs4filelayout.c
parentbd4aeffb5b89070ae93c579f1d5a0758f7123e8b (diff)
NFS: Fix compiler warnings
The "struct inode *inode" was only used in a dprintk, so compiling with CONFIG_SUNRPC_DEBUG off triggers a warning. To get around this, I remove the "struct inode *inode" variable and instead change the dprintk()s to use hdr->inode instead. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4filelayout.c')
-rw-r--r--fs/nfs/nfs4filelayout.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
index 56aa0ec1b16..ddea4d3f598 100644
--- a/fs/nfs/nfs4filelayout.c
+++ b/fs/nfs/nfs4filelayout.c
@@ -85,15 +85,14 @@ filelayout_get_dserver_offset(struct pnfs_layout_segment *lseg, loff_t offset)
static void filelayout_reset_write(struct nfs_write_data *data)
{
struct nfs_pgio_header *hdr = data->header;
- struct inode *inode = hdr->inode;
struct rpc_task *task = &data->task;
if (!test_and_set_bit(NFS_IOHDR_REDO, &hdr->flags)) {
dprintk("%s Reset task %5u for i/o through MDS "
"(req %s/%lld, %u bytes @ offset %llu)\n", __func__,
data->task.tk_pid,
- inode->i_sb->s_id,
- (long long)NFS_FILEID(inode),
+ hdr->inode->i_sb->s_id,
+ (long long)NFS_FILEID(hdr->inode),
data->args.count,
(unsigned long long)data->args.offset);
@@ -106,15 +105,14 @@ static void filelayout_reset_write(struct nfs_write_data *data)
static void filelayout_reset_read(struct nfs_read_data *data)
{
struct nfs_pgio_header *hdr = data->header;
- struct inode *inode = hdr->inode;
struct rpc_task *task = &data->task;
if (!test_and_set_bit(NFS_IOHDR_REDO, &hdr->flags)) {
dprintk("%s Reset task %5u for i/o through MDS "
"(req %s/%lld, %u bytes @ offset %llu)\n", __func__,
data->task.tk_pid,
- inode->i_sb->s_id,
- (long long)NFS_FILEID(inode),
+ hdr->inode->i_sb->s_id,
+ (long long)NFS_FILEID(hdr->inode),
data->args.count,
(unsigned long long)data->args.offset);