Skip to content

Commit

Permalink
NFSD: Remove setting unused variable in nfsd_vfs_read()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bryan Schumaker authored and J. Bruce Fields committed Apr 30, 2011
1 parent bcecf1c commit fccb13c
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions fs/nfsd/vfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit fccb13c

Please sign in to comment.