]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
NFSD: Remove setting unused variable in nfsd_vfs_read()
authorBryan Schumaker <bjschuma@netapp.com>
Wed, 27 Apr 2011 19:47:14 +0000 (15:47 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Sat, 30 Apr 2011 00:47:57 +0000 (20:47 -0400)
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: Bryan Schumaker <bjschuma@netapp.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/vfs.c

index 389e45ad200b1c4a507e2ff636c8ad9d6786c657..f4e056ae53e4bafaf1f45fb415046788bd6b23fb 100644 (file)
@@ -874,13 +874,11 @@ static __be32
 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)
 {
-       struct inode *inode;
        mm_segment_t    oldfs;
        __be32          err;
        int             host_err;
 
        err = nfserr_perm;
-       inode = file->f_path.dentry->d_inode;
 
        if (file->f_op->splice_read && rqstp->rq_splice_ok) {
                struct splice_desc sd = {