diff options
author | Jan Kara <jack@suse.cz> | 2014-10-23 14:02:47 +0200 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2014-11-19 18:38:23 +0100 |
commit | 77683fa6ccecf2eb8b4dd34fe609455580dfe766 (patch) | |
tree | f3c20d37194397bddb0cf7766867451f31c35988 /fs/nfs | |
parent | a78d2dde1a6297c60901b287ccdb843d260f4483 (diff) |
nfs: Fix use of uninitialized variable in nfs_getattr()
commit 16caf5b6101d03335b386e77e9e14136f989be87 upstream.
Variable 'err' needn't be initialized when nfs_getattr() uses it to
check whether it should call generic_fillattr() or not. That can result
in spurious error returns. Initialize 'err' properly.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 7f5799d098fd..e5eb677ca9ce 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -598,7 +598,7 @@ int nfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) { struct inode *inode = dentry->d_inode; int need_atime = NFS_I(inode)->cache_validity & NFS_INO_INVALID_ATIME; - int err; + int err = 0; trace_nfs_getattr_enter(inode); /* Flush out writes to the server in order to update c/mtime. */ |