Commit fccb13c9 authored by Bryan Schumaker's avatar Bryan Schumaker Committed by J. Bruce Fields

NFSD: Remove setting unused variable in nfsd_vfs_read()

Compiling gave me this warning:
fs/nfsd/vfs.c: In function ‘nfsd_vfs_read’:
fs/nfsd/vfs.c:880:16: warning: variable ‘inode’ set but not used
[-Wunused-but-set-variable]

I discovered that a local variable "inode" was being set towards the
beginning of nfsd_vfs_read() and then ignored for the rest of the
function.
Signed-off-by: default avatarBryan Schumaker <bjschuma@netapp.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent bcecf1cc
...@@ -874,13 +874,11 @@ static __be32 ...@@ -874,13 +874,11 @@ static __be32
nfsd_vfs_read(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file, nfsd_vfs_read(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
loff_t offset, struct kvec *vec, int vlen, unsigned long *count) loff_t offset, struct kvec *vec, int vlen, unsigned long *count)
{ {
struct inode *inode;
mm_segment_t oldfs; mm_segment_t oldfs;
__be32 err; __be32 err;
int host_err; int host_err;
err = nfserr_perm; err = nfserr_perm;
inode = file->f_path.dentry->d_inode;
if (file->f_op->splice_read && rqstp->rq_splice_ok) { if (file->f_op->splice_read && rqstp->rq_splice_ok) {
struct splice_desc sd = { struct splice_desc sd = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment