From patchwork Tue Sep 25 07:00:07 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Shilovsky X-Patchwork-Id: 1502421 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 E4A62DF28C for ; Tue, 25 Sep 2012 07:00:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751601Ab2IYHAX (ORCPT ); Tue, 25 Sep 2012 03:00:23 -0400 Received: from mail-lb0-f174.google.com ([209.85.217.174]:40998 "EHLO mail-lb0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750884Ab2IYHAW (ORCPT ); Tue, 25 Sep 2012 03:00:22 -0400 Received: by lbbgj3 with SMTP id gj3so7872832lbb.19 for ; Tue, 25 Sep 2012 00:00:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:x-mailer; bh=1sgLH9rjdGiCaFotJ0OcWeV1/wKnitSne/mGLgVT/2M=; b=vZx6+6vz/dHZNYP7o4QQ/iZIEhIvwrbyRANrmRsGJVFdRxq1c7xzJKBgxAJz6bGckq NuZTly2UDBe3rt+ZR6Q39KuKXCP6FkFPkxJu0YXEygDWtjR8kLmupe9PunrVjvNEJzEz zWluUPe04KCTb19StRZBkAUVe9n1tj3/CAclkUBsD1j5b8XmhpO5C1r65r5TupamrpB6 svrpD2noNhAUNHXRSfytpMaB9cp53vHCgG5GqSWR1u6eNiuRJRABL+DuKCM6YECFZR/D phRZ14rJaOltqsLkfhVt7Cv825D19t9DiE6FQbl8LE0PKWxMC0mXDcts1C5fIntDwEH8 4N8A== Received: by 10.152.48.102 with SMTP id k6mr10824246lan.12.1348556421319; Tue, 25 Sep 2012 00:00:21 -0700 (PDT) Received: from localhost.localdomain ([178.45.141.120]) by mx.google.com with ESMTPS id p7sm4800417lbg.17.2012.09.25.00.00.18 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 25 Sep 2012 00:00:19 -0700 (PDT) From: Pavel Shilovsky To: linux-cifs@vger.kernel.org Subject: [PATCH] CIFS: Make ops->close return void Date: Tue, 25 Sep 2012 11:00:07 +0400 Message-Id: <1348556409-10339-1-git-send-email-piastry@etersoft.ru> X-Mailer: git-send-email 1.7.5.4 Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org Signed-off-by: Pavel Shilovsky --- fs/cifs/cifsglob.h | 3 ++- fs/cifs/file.c | 5 ++--- fs/cifs/smb1ops.c | 4 ++-- fs/cifs/smb2ops.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index a39e5b7..f6f4063 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h @@ -316,7 +316,8 @@ struct smb_version_operations { /* set fid protocol-specific info */ void (*set_fid)(struct cifsFileInfo *, struct cifs_fid *, __u32); /* close a file */ - int (*close)(const unsigned int, struct cifs_tcon *, struct cifs_fid *); + void (*close)(const unsigned int, struct cifs_tcon *, + struct cifs_fid *); /* send a flush request to the server */ int (*flush)(const unsigned int, struct cifs_tcon *, struct cifs_fid *); /* async read from the server */ diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 075f7cf..7d7bbdc 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -355,12 +355,11 @@ void cifsFileInfo_put(struct cifsFileInfo *cifs_file) if (!tcon->need_reconnect && !cifs_file->invalidHandle) { struct TCP_Server_Info *server = tcon->ses->server; unsigned int xid; - int rc = -ENOSYS; xid = get_xid(); if (server->ops->close) - rc = server->ops->close(xid, tcon, &cifs_file->fid); - free_xid(xid); + server->ops->close(xid, tcon, &cifs_file->fid); + _free_xid(xid); } cifs_del_pending_open(&open); diff --git a/fs/cifs/smb1ops.c b/fs/cifs/smb1ops.c index 5fb0fe5..42dccbb 100644 --- a/fs/cifs/smb1ops.c +++ b/fs/cifs/smb1ops.c @@ -720,11 +720,11 @@ cifs_set_fid(struct cifsFileInfo *cfile, struct cifs_fid *fid, __u32 oplock) cinode->can_cache_brlcks = cinode->clientCanCacheAll; } -static int +static void cifs_close_file(const unsigned int xid, struct cifs_tcon *tcon, struct cifs_fid *fid) { - return CIFSSMBClose(xid, tcon, fid->netfid); + CIFSSMBClose(xid, tcon, fid->netfid); } static int diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c index 2183bb3..1570cbe 100644 --- a/fs/cifs/smb2ops.c +++ b/fs/cifs/smb2ops.c @@ -374,11 +374,11 @@ smb2_set_fid(struct cifsFileInfo *cfile, struct cifs_fid *fid, __u32 oplock) cinode->can_cache_brlcks = cinode->clientCanCacheAll; } -static int +static void smb2_close_file(const unsigned int xid, struct cifs_tcon *tcon, struct cifs_fid *fid) { - return SMB2_close(xid, tcon, fid->persistent_fid, fid->volatile_fid); + SMB2_close(xid, tcon, fid->persistent_fid, fid->volatile_fid); } static int