aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/llite/xattr.c
diff options
context:
space:
mode:
authorDmitry Eremin <dmitry.eremin@intel.com>2014-06-22 21:32:17 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-06-26 20:45:06 -0400
commit23ea7e7b3ec6783544dd7600658f2f7ed8cb51a6 (patch)
tree98fa50a3fe2f619ea339767bbcf7da2e848ede16 /drivers/staging/lustre/lustre/llite/xattr.c
parentstaging/lustre/osc: osc_extent_truncate()) ASSERTION( !ext->oe_urgent ) failed (diff)
downloadlinux-dev-23ea7e7b3ec6783544dd7600658f2f7ed8cb51a6.tar.xz
linux-dev-23ea7e7b3ec6783544dd7600658f2f7ed8cb51a6.zip
staging/lustre/llite: Fix uninitialized variable
'f.f_flags' might be used uninitialized in this function. xattr.c:248: 'f.f_flags' is declared. xattr.c:244: lump!= ( (void* )0) is true xattr.c:254: 'f.f_flags' is used, but is uninitialized. Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-on: http://review.whamcloud.com/10663 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4629 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/llite/xattr.c')
-rw-r--r--drivers/staging/lustre/lustre/llite/xattr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/lustre/lustre/llite/xattr.c b/drivers/staging/lustre/lustre/llite/xattr.c
index c6c27bbb43b4..c1eff650aa82 100644
--- a/drivers/staging/lustre/lustre/llite/xattr.c
+++ b/drivers/staging/lustre/lustre/llite/xattr.c
@@ -246,6 +246,7 @@ int ll_setxattr(struct dentry *dentry, const char *name,
int lum_size = (lump->lmm_magic == LOV_USER_MAGIC_V1) ?
sizeof(*lump) : sizeof(struct lov_user_md_v3);
+ memset(&f, 0, sizeof(f)); /* f.f_flags is used below */
f.f_dentry = dentry;
rc = ll_lov_setstripe_ea_info(inode, &f, flags, lump,
lum_size);