cifs: Fix uninitialized memory reads for oparms.mode
[linux-2.6-microblaze.git] / fs / cifs / cifsacl.c
index bbf58c2..3cc3471 100644 (file)
@@ -1428,14 +1428,15 @@ static struct cifs_ntsd *get_cifs_acl_by_path(struct cifs_sb_info *cifs_sb,
        tcon = tlink_tcon(tlink);
        xid = get_xid();
 
-       oparms.tcon = tcon;
-       oparms.cifs_sb = cifs_sb;
-       oparms.desired_access = READ_CONTROL;
-       oparms.create_options = cifs_create_options(cifs_sb, 0);
-       oparms.disposition = FILE_OPEN;
-       oparms.path = path;
-       oparms.fid = &fid;
-       oparms.reconnect = false;
+       oparms = (struct cifs_open_parms) {
+               .tcon = tcon,
+               .cifs_sb = cifs_sb,
+               .desired_access = READ_CONTROL,
+               .create_options = cifs_create_options(cifs_sb, 0),
+               .disposition = FILE_OPEN,
+               .path = path,
+               .fid = &fid,
+       };
 
        rc = CIFS_open(xid, &oparms, &oplock, NULL);
        if (!rc) {
@@ -1494,14 +1495,15 @@ int set_cifs_acl(struct cifs_ntsd *pnntsd, __u32 acllen,
        else
                access_flags = WRITE_DAC;
 
-       oparms.tcon = tcon;
-       oparms.cifs_sb = cifs_sb;
-       oparms.desired_access = access_flags;
-       oparms.create_options = cifs_create_options(cifs_sb, 0);
-       oparms.disposition = FILE_OPEN;
-       oparms.path = path;
-       oparms.fid = &fid;
-       oparms.reconnect = false;
+       oparms = (struct cifs_open_parms) {
+               .tcon = tcon,
+               .cifs_sb = cifs_sb,
+               .desired_access = access_flags,
+               .create_options = cifs_create_options(cifs_sb, 0),
+               .disposition = FILE_OPEN,
+               .path = path,
+               .fid = &fid,
+       };
 
        rc = CIFS_open(xid, &oparms, &oplock, NULL);
        if (rc) {