From patchwork Sat Jan 9 19:30:37 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roel Kluin X-Patchwork-Id: 102650 Received: from lists.samba.org (fn.samba.org [216.83.154.106]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4RCZlCx013176 for ; Thu, 27 May 2010 12:36:35 GMT Received: from fn.samba.org (localhost [127.0.0.1]) by lists.samba.org (Postfix) with ESMTP id A120646632; Thu, 27 May 2010 06:35:20 -0600 (MDT) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on fn.samba.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.8 tests=BAYES_00,SPF_PASS autolearn=ham version=3.2.5 X-Original-To: linux-cifs-client@lists.samba.org Delivered-To: linux-cifs-client@lists.samba.org Received: from mail-ew0-f209.google.com (mail-ew0-f209.google.com [209.85.219.209]) by lists.samba.org (Postfix) with ESMTP id 20777AC5A9; Sat, 9 Jan 2010 12:31:42 -0700 (MST) Received: by ewy1 with SMTP id 1so1673504ewy.28 for ; Sat, 09 Jan 2010 11:26:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=NgYLgYEBvbw8EgIiuRRHwNvQa9HMgHrw3q07qFceSCs=; b=F9tJL5xZE0oi2hMJdIV9jLd03Lu3M8+nVvSdm1GqhoZV1xoWTF9X87UK5kCkjxceum a2VlVU7QLvx6MNU8OFK6GG9C1KSb3KSWf3vLRmAEKCqvdnBosHmYE6Zf4Qp2uBOGTC/r VaRWEa27dSH+uQopRq2gah5gEv2I/4ffox8Yo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=UZBfWm3WBfY3WwWJCK79yQcYonz0Hjn/8Pq2v5YQWwwp/McMWeuYkir8t6c76UAl3K uGtizAWilvMA8ZiRCJ/XpjQ+yv6QLkTTBj+8U9lzQyUbEy6ZyehpUYSDi5IC+9OAB2eF MnqxBep8R0mkkX4sqI+ZzLpHUuuLwkNUoSonA= Received: by 10.213.43.66 with SMTP id v2mr1046503ebe.19.1263065192542; Sat, 09 Jan 2010 11:26:32 -0800 (PST) Received: from zoinx.mars (d133062.upc-d.chello.nl [213.46.133.62]) by mx.google.com with ESMTPS id 7sm5998110eyg.33.2010.01.09.11.26.31 (version=SSLv3 cipher=RC4-MD5); Sat, 09 Jan 2010 11:26:32 -0800 (PST) Message-ID: <4B48D95D.5000106@gmail.com> Date: Sat, 09 Jan 2010 20:30:37 +0100 From: Roel Kluin User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-4.fc12 Thunderbird/3.0 MIME-Version: 1.0 To: Steve French , linux-cifs-client@lists.samba.org, samba-technical@lists.samba.org, Andrew Morton , LKML X-Mailman-Approved-At: Thu, 27 May 2010 06:34:18 -0600 Subject: [linux-cifs-client] [PATCH] cifs: remove redundant test in cifs_lookup() and cifs_do_rename() X-BeenThere: linux-cifs-client@lists.samba.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: The Linux CIFS VFS client List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-cifs-client-bounces@lists.samba.org Errors-To: linux-cifs-client-bounces@lists.samba.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 27 May 2010 12:36:35 +0000 (UTC) diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index 6ccf726..f5cfdd6 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 != -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 */