From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: re: Fix problem recognizing symlinks
Date: Fri, 26 Sep 2014 18:06:15 +0300 [thread overview]
Message-ID: <20140926150615.GA11817@mwanda> (raw)
Hello Steve French,
The patch 2b20ac4fcd7b: "Fix problem recognizing symlinks" from Sep
25, 2014, leads to the following static checker warning:
fs/cifs/smb1ops.c:589 cifs_query_path_info()
warn: we tested 'rc' before and it was 'false'
fs/cifs/smb1ops.c
569
570 if (!rc && (le32_to_cpu(data->Attributes) & ATTR_REPARSE)) {
^^^
571 int tmprc;
572 int oplock = 0;
573 struct cifs_fid fid;
574 struct cifs_open_parms oparms;
575
576 oparms.tcon = tcon;
577 oparms.cifs_sb = cifs_sb;
578 oparms.desired_access = FILE_READ_ATTRIBUTES;
579 oparms.create_options = 0;
580 oparms.disposition = FILE_OPEN;
581 oparms.path = full_path;
582 oparms.fid = &fid;
583 oparms.reconnect = false;
584
585 /* Need to check if this is a symbolic link or not */
586 tmprc = CIFS_open(xid, &oparms, &oplock, NULL);
587 if (tmprc == -EOPNOTSUPP)
588 *symlink = true;
589 else if (rc == 0)
^^^^^^^
The patch adds this new always true condition. It's not clear what the
intent was.
590 CIFSSMBClose(xid, tcon, fid.netfid);
591 }
regards,
dan carpenter
next reply other threads:[~2014-09-26 15:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-26 15:06 Dan Carpenter [this message]
2014-09-26 15:14 ` Fix problem recognizing symlinks Steve French
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140926150615.GA11817@mwanda \
--to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
--cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.