From patchwork Tue Mar 5 19:25:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Prabhu X-Patchwork-Id: 2221261 Return-Path: X-Original-To: patchwork-cifs-client@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id CC789DF24C for ; Tue, 5 Mar 2013 19:26:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757377Ab3CET0B (ORCPT ); Tue, 5 Mar 2013 14:26:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54404 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752847Ab3CET0B (ORCPT ); Tue, 5 Mar 2013 14:26:01 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r25JQ002017928 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 5 Mar 2013 14:26:01 -0500 Received: from localhost.localdomain.com (vpn1-6-75.ams2.redhat.com [10.36.6.75]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r25JPv3V028629 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 5 Mar 2013 14:26:00 -0500 From: Sachin Prabhu To: linux-cifs Subject: [PATCH 1/3] cifs: Fix bug when checking error condition in cifs_rename_pending_delete() Date: Tue, 5 Mar 2013 19:25:55 +0000 Message-Id: <1362511557-22607-2-git-send-email-sprabhu@redhat.com> In-Reply-To: <1362511557-22607-1-git-send-email-sprabhu@redhat.com> References: <1362511557-22607-1-git-send-email-sprabhu@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org Fix check for error condition after setting attributes with CIFSSMBSetFileInfo(). Signed-off-by: Sachin Prabhu Reviewed-by: Jeff Layton Reviewed-by: Pavel Shilovsky --- fs/cifs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index ed6208f..a183b9d 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c @@ -1014,7 +1014,7 @@ cifs_rename_pending_delete(const char *full_path, struct dentry *dentry, current->tgid); /* although we would like to mark the file hidden if that fails we will still try to rename it */ - if (rc != 0) + if (!rc) cifsInode->cifsAttrs = dosattr; else dosattr = origattr; /* since not able to change them */