* re: Fix problem recognizing symlinks
@ 2014-09-26 15:06 Dan Carpenter
2014-09-26 15:14 ` Steve French
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2014-09-26 15:06 UTC (permalink / raw)
To: smfrench-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Fix problem recognizing symlinks
2014-09-26 15:06 Fix problem recognizing symlinks Dan Carpenter
@ 2014-09-26 15:14 ` Steve French
0 siblings, 0 replies; 2+ messages in thread
From: Steve French @ 2014-09-26 15:14 UTC (permalink / raw)
To: Dan Carpenter; +Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
That is already fixed in cifs-2.6.git for-next
On Fri, Sep 26, 2014 at 8:06 AM, Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> wrote:
> 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
--
Thanks,
Steve
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-09-26 15:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-26 15:06 Fix problem recognizing symlinks Dan Carpenter
2014-09-26 15:14 ` Steve French
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.