From patchwork Fri Sep 17 14:13:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suresh Jayaraman X-Patchwork-Id: 188162 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o8HEDI0Z028750 for ; Fri, 17 Sep 2010 14:13:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753483Ab0IQONS (ORCPT ); Fri, 17 Sep 2010 10:13:18 -0400 Received: from cantor2.suse.de ([195.135.220.15]:59350 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753393Ab0IQONR (ORCPT ); Fri, 17 Sep 2010 10:13:17 -0400 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id D094D86391; Fri, 17 Sep 2010 16:13:16 +0200 (CEST) Message-ID: <4C937776.909@suse.de> Date: Fri, 17 Sep 2010 19:43:10 +0530 From: Suresh Jayaraman User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100714 SUSE/3.0.6 Thunderbird/3.0.6 MIME-Version: 1.0 To: Steve French Cc: linux-cifs@vger.kernel.org Subject: [PATCH] cifs: use type __u32 instead of int for the oplock parameter Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Fri, 17 Sep 2010 14:13:18 +0000 (UTC) diff --git a/fs/cifs/file.c b/fs/cifs/file.c index de748c6..d33da45 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -165,7 +165,7 @@ psx_client_can_cache: /* all arguments to this function must be checked for validity in caller */ static inline int cifs_open_inode_helper(struct inode *inode, - struct cifsTconInfo *pTcon, int *oplock, FILE_ALL_INFO *buf, + struct cifsTconInfo *pTcon, __u32 oplock, FILE_ALL_INFO *buf, char *full_path, int xid) { struct cifsInodeInfo *pCifsInode = CIFS_I(inode); @@ -207,11 +207,11 @@ client_can_cache: rc = cifs_get_inode_info(&inode, full_path, buf, inode->i_sb, xid, NULL); - if ((*oplock & 0xF) == OPLOCK_EXCLUSIVE) { + if ((oplock & 0xF) == OPLOCK_EXCLUSIVE) { pCifsInode->clientCanCacheAll = true; pCifsInode->clientCanCacheRead = true; cFYI(1, "Exclusive Oplock granted on inode %p", inode); - } else if ((*oplock & 0xF) == OPLOCK_READ) + } else if ((oplock & 0xF) == OPLOCK_READ) pCifsInode->clientCanCacheRead = true; return rc; @@ -365,7 +365,7 @@ int cifs_open(struct inode *inode, struct file *file) goto out; } - rc = cifs_open_inode_helper(inode, tcon, &oplock, buf, full_path, xid); + rc = cifs_open_inode_helper(inode, tcon, oplock, buf, full_path, xid); if (rc != 0) goto out;