aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorChuck Lever <cel@netapp.com>2005-11-01 16:53:32 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2005-11-04 15:39:48 -0500
commit0bbacc402e67abca8794a8401c1621dc0c0202e9 (patch)
treea0969978295b806b35c943eb16af34b1eacfa47a /fs/nfs
parentc556b754967afd0878d65de2cfe0675577b0f62f (diff)
NFS,SUNRPC,NLM: fix unused variable warnings when CONFIG_SYSCTL is disabled
Fix some dprintk's so that NLM, NFS client, and RPC client compile cleanly if CONFIG_SYSCTL is disabled. Test plan: Compile kernel with CONFIG_NFS enabled and CONFIG_SYSCTL disabled. Signed-off-by: Chuck Lever <cel@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/direct.c10
-rw-r--r--fs/nfs/write.c12
2 files changed, 10 insertions, 12 deletions
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index 6537f2c4ae44..b497c71384e8 100644
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -655,7 +655,6 @@ nfs_file_direct_read(struct kiocb *iocb, char __user *buf, size_t count, loff_t
655 struct file *file = iocb->ki_filp; 655 struct file *file = iocb->ki_filp;
656 struct nfs_open_context *ctx = 656 struct nfs_open_context *ctx =
657 (struct nfs_open_context *) file->private_data; 657 (struct nfs_open_context *) file->private_data;
658 struct dentry *dentry = file->f_dentry;
659 struct address_space *mapping = file->f_mapping; 658 struct address_space *mapping = file->f_mapping;
660 struct inode *inode = mapping->host; 659 struct inode *inode = mapping->host;
661 struct iovec iov = { 660 struct iovec iov = {
@@ -664,7 +663,8 @@ nfs_file_direct_read(struct kiocb *iocb, char __user *buf, size_t count, loff_t
664 }; 663 };
665 664
666 dprintk("nfs: direct read(%s/%s, %lu@%lu)\n", 665 dprintk("nfs: direct read(%s/%s, %lu@%lu)\n",
667 dentry->d_parent->d_name.name, dentry->d_name.name, 666 file->f_dentry->d_parent->d_name.name,
667 file->f_dentry->d_name.name,
668 (unsigned long) count, (unsigned long) pos); 668 (unsigned long) count, (unsigned long) pos);
669 669
670 if (!is_sync_kiocb(iocb)) 670 if (!is_sync_kiocb(iocb))
@@ -730,7 +730,6 @@ nfs_file_direct_write(struct kiocb *iocb, const char __user *buf, size_t count,
730 struct file *file = iocb->ki_filp; 730 struct file *file = iocb->ki_filp;
731 struct nfs_open_context *ctx = 731 struct nfs_open_context *ctx =
732 (struct nfs_open_context *) file->private_data; 732 (struct nfs_open_context *) file->private_data;
733 struct dentry *dentry = file->f_dentry;
734 struct address_space *mapping = file->f_mapping; 733 struct address_space *mapping = file->f_mapping;
735 struct inode *inode = mapping->host; 734 struct inode *inode = mapping->host;
736 struct iovec iov = { 735 struct iovec iov = {
@@ -739,8 +738,9 @@ nfs_file_direct_write(struct kiocb *iocb, const char __user *buf, size_t count,
739 }; 738 };
740 739
741 dfprintk(VFS, "nfs: direct write(%s/%s(%ld), %lu@%lu)\n", 740 dfprintk(VFS, "nfs: direct write(%s/%s(%ld), %lu@%lu)\n",
742 dentry->d_parent->d_name.name, dentry->d_name.name, 741 file->f_dentry->d_parent->d_name.name,
743 inode->i_ino, (unsigned long) count, (unsigned long) pos); 742 file->f_dentry->d_name.name, inode->i_ino,
743 (unsigned long) count, (unsigned long) pos);
744 744
745 if (!is_sync_kiocb(iocb)) 745 if (!is_sync_kiocb(iocb))
746 goto out; 746 goto out;
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 1bdbd4f9fdd2..8f71e766cc5d 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -734,14 +734,14 @@ int nfs_updatepage(struct file *file, struct page *page,
734 unsigned int offset, unsigned int count) 734 unsigned int offset, unsigned int count)
735{ 735{
736 struct nfs_open_context *ctx = (struct nfs_open_context *)file->private_data; 736 struct nfs_open_context *ctx = (struct nfs_open_context *)file->private_data;
737 struct dentry *dentry = file->f_dentry;
738 struct inode *inode = page->mapping->host; 737 struct inode *inode = page->mapping->host;
739 struct nfs_page *req; 738 struct nfs_page *req;
740 int status = 0; 739 int status = 0;
741 740
742 dprintk("NFS: nfs_updatepage(%s/%s %d@%Ld)\n", 741 dprintk("NFS: nfs_updatepage(%s/%s %d@%Ld)\n",
743 dentry->d_parent->d_name.name, dentry->d_name.name, 742 file->f_dentry->d_parent->d_name.name,
744 count, (long long)(page_offset(page) +offset)); 743 file->f_dentry->d_name.name, count,
744 (long long)(page_offset(page) +offset));
745 745
746 if (IS_SYNC(inode)) { 746 if (IS_SYNC(inode)) {
747 status = nfs_writepage_sync(ctx, inode, page, offset, count, 0); 747 status = nfs_writepage_sync(ctx, inode, page, offset, count, 0);
@@ -850,7 +850,6 @@ static void nfs_write_rpcsetup(struct nfs_page *req,
850 unsigned int count, unsigned int offset, 850 unsigned int count, unsigned int offset,
851 int how) 851 int how)
852{ 852{
853 struct rpc_task *task = &data->task;
854 struct inode *inode; 853 struct inode *inode;
855 854
856 /* Set up the RPC argument and reply structs 855 /* Set up the RPC argument and reply structs
@@ -881,7 +880,7 @@ static void nfs_write_rpcsetup(struct nfs_page *req,
881 data->task.tk_release = nfs_writedata_release; 880 data->task.tk_release = nfs_writedata_release;
882 881
883 dprintk("NFS: %4d initiated write call (req %s/%Ld, %u bytes @ offset %Lu)\n", 882 dprintk("NFS: %4d initiated write call (req %s/%Ld, %u bytes @ offset %Lu)\n",
884 task->tk_pid, 883 data->task.tk_pid,
885 inode->i_sb->s_id, 884 inode->i_sb->s_id,
886 (long long)NFS_FILEID(inode), 885 (long long)NFS_FILEID(inode),
887 count, 886 count,
@@ -1217,7 +1216,6 @@ static void nfs_commit_release(struct rpc_task *task)
1217static void nfs_commit_rpcsetup(struct list_head *head, 1216static void nfs_commit_rpcsetup(struct list_head *head,
1218 struct nfs_write_data *data, int how) 1217 struct nfs_write_data *data, int how)
1219{ 1218{
1220 struct rpc_task *task = &data->task;
1221 struct nfs_page *first; 1219 struct nfs_page *first;
1222 struct inode *inode; 1220 struct inode *inode;
1223 1221
@@ -1248,7 +1246,7 @@ static void nfs_commit_rpcsetup(struct list_head *head,
1248 /* Release requests */ 1246 /* Release requests */
1249 data->task.tk_release = nfs_commit_release; 1247 data->task.tk_release = nfs_commit_release;
1250 1248
1251 dprintk("NFS: %4d initiated commit call\n", task->tk_pid); 1249 dprintk("NFS: %4d initiated commit call\n", data->task.tk_pid);
1252} 1250}
1253 1251
1254/* 1252/*