From: Roel Kluin <roel.kluin@gmail.com>
To: Steve French <smfrench@gmail.com>
Cc: Steve French <sfrench@samba.org>,
linux-cifs-client@lists.samba.org,
samba-technical@lists.samba.org,
Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Subject: Re: [PATCH] cifs: remove redundant test in cifs_lookup() and cifs_do_rename()
Date: Mon, 11 Jan 2010 23:09:40 +0100 [thread overview]
Message-ID: <4B4BA1A4.9050800@gmail.com> (raw)
In-Reply-To: <524f69651001111353u512e9b80s46b26714e27b5130@mail.gmail.com>
rc != -EOPNOTSUPP is true as well if rc is -EINVAL.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
> At first glance this looks like a typo (probably not a serious one, but
> worth fixing)
>
> - else if ((rc == -EINVAL) || (rc != -EOPNOTSUPP))
>
> looks like it should be:
>
> + else if ((rc == -EINVAL) || (rc == -EOPNOTSUPP))
> --
> Thanks,
>
> Steve
Yes, according to the comment it appears you're right.
Thanks
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index 6ccf726..33a7427 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -690,7 +690,7 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry,
*/
if ((rc == 0) || (rc == -ENOENT))
posix_open = true;
- else if ((rc == -EINVAL) || (rc != -EOPNOTSUPP))
+ else if ((rc == -EINVAL) || (rc == -EOPNOTSUPP))
pTcon->broken_posix_open = true;
}
if (!posix_open)
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index cf18ee7..aec2928 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -1264,7 +1264,7 @@ cifs_do_rename(int xid, struct dentry *from_dentry, const char *fromPath,
* source Note that cross directory moves do not work with
* rename by filehandle to various Windows servers.
*/
- if (rc == 0 || rc != -ETXTBSY)
+ if (rc != -ETXTBSY)
return rc;
/* open the file to be renamed -- we need DELETE perms */
prev parent reply other threads:[~2010-01-11 22:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-09 19:30 [PATCH] cifs: remove redundant test in cifs_lookup() and cifs_do_rename() Roel Kluin
[not found] ` <524f69651001111353u512e9b80s46b26714e27b5130@mail.gmail.com>
2010-01-11 22:09 ` Roel Kluin [this message]
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=4B4BA1A4.9050800@gmail.com \
--to=roel.kluin@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-cifs-client@lists.samba.org \
--cc=linux-kernel@vger.kernel.org \
--cc=samba-technical@lists.samba.org \
--cc=sfrench@samba.org \
--cc=shirishpargaonkar@gmail.com \
--cc=smfrench@gmail.com \
/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.