aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRakib Mullick <rakib.mullick@gmail.com>2011-11-01 02:16:15 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2011-11-02 23:49:09 -0400
commit6f276e49fd108362be3fd67154aaaacf872ea026 (patch)
treee44765996007b20727873ae26784ee682c23e425
parente414966b81a74745ac8d6bfeda0d95fb721e6d91 (diff)
nfs: Fix unused variable warning from file.c
Fix the following unused variable warning. fs/nfs/file.c: In function ‘nfs_file_release’: fs/nfs/file.c:140:17: warning: unused variable ‘dentry’ fs/nfs/file.c: In function ‘nfs_file_read’: fs/nfs/file.c:237:9: warning: unused variable ‘count’ Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r--fs/nfs/file.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index 28b8c3f3cda3..bd7dff001106 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -137,11 +137,9 @@ nfs_file_open(struct inode *inode, struct file *filp)
137static int 137static int
138nfs_file_release(struct inode *inode, struct file *filp) 138nfs_file_release(struct inode *inode, struct file *filp)
139{ 139{
140 struct dentry *dentry = filp->f_path.dentry;
141
142 dprintk("NFS: release(%s/%s)\n", 140 dprintk("NFS: release(%s/%s)\n",
143 dentry->d_parent->d_name.name, 141 filp->f_path.dentry->d_parent->d_name.name,
144 dentry->d_name.name); 142 filp->f_path.dentry->d_name.name);
145 143
146 nfs_inc_stats(inode, NFSIOS_VFSRELEASE); 144 nfs_inc_stats(inode, NFSIOS_VFSRELEASE);
147 return nfs_release(inode, filp); 145 return nfs_release(inode, filp);
@@ -234,14 +232,13 @@ nfs_file_read(struct kiocb *iocb, const struct iovec *iov,
234 struct dentry * dentry = iocb->ki_filp->f_path.dentry; 232 struct dentry * dentry = iocb->ki_filp->f_path.dentry;
235 struct inode * inode = dentry->d_inode; 233 struct inode * inode = dentry->d_inode;
236 ssize_t result; 234 ssize_t result;
237 size_t count = iov_length(iov, nr_segs);
238 235
239 if (iocb->ki_filp->f_flags & O_DIRECT) 236 if (iocb->ki_filp->f_flags & O_DIRECT)
240 return nfs_file_direct_read(iocb, iov, nr_segs, pos); 237 return nfs_file_direct_read(iocb, iov, nr_segs, pos);
241 238
242 dprintk("NFS: read(%s/%s, %lu@%lu)\n", 239 dprintk("NFS: read(%s/%s, %lu@%lu)\n",
243 dentry->d_parent->d_name.name, dentry->d_name.name, 240 dentry->d_parent->d_name.name, dentry->d_name.name,
244 (unsigned long) count, (unsigned long) pos); 241 (unsigned long) iov_length(iov, nr_segs), (unsigned long) pos);
245 242
246 result = nfs_revalidate_mapping(inode, iocb->ki_filp->f_mapping); 243 result = nfs_revalidate_mapping(inode, iocb->ki_filp->f_mapping);
247 if (!result) { 244 if (!result) {