diff options
author | Suresh Jayaraman <sjayaraman@suse.de> | 2010-09-17 10:13:10 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2010-09-29 15:04:28 -0400 |
commit | a347ecb209b58a1b37f20d8299ab552f7d3ee8c3 (patch) | |
tree | 67742ff720e87b28c0621f5b200b8c1d06d930f9 | |
parent | 899611ee7d373e5eeda08e9a8632684e1ebbbf00 (diff) |
cifs: use type __u32 instead of int for the oplock parameter
... and avoid implicit casting from a signed type. Also, pass oplock by value
instead by reference as we don't intend to change the value in
cifs_open_inode_helper().
Thanks to Jeff Layton for spotting this.
Reviewed-by: Jeff Layton <jlayton@samba.org>
Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
Signed-off-by: Steve French <sfrench@us.ibm.com>
-rw-r--r-- | fs/cifs/file.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index de748c652d11..d33da45fe987 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -165,7 +165,7 @@ psx_client_can_cache: | |||
165 | 165 | ||
166 | /* all arguments to this function must be checked for validity in caller */ | 166 | /* all arguments to this function must be checked for validity in caller */ |
167 | static inline int cifs_open_inode_helper(struct inode *inode, | 167 | static inline int cifs_open_inode_helper(struct inode *inode, |
168 | struct cifsTconInfo *pTcon, int *oplock, FILE_ALL_INFO *buf, | 168 | struct cifsTconInfo *pTcon, __u32 oplock, FILE_ALL_INFO *buf, |
169 | char *full_path, int xid) | 169 | char *full_path, int xid) |
170 | { | 170 | { |
171 | struct cifsInodeInfo *pCifsInode = CIFS_I(inode); | 171 | struct cifsInodeInfo *pCifsInode = CIFS_I(inode); |
@@ -207,11 +207,11 @@ client_can_cache: | |||
207 | rc = cifs_get_inode_info(&inode, full_path, buf, inode->i_sb, | 207 | rc = cifs_get_inode_info(&inode, full_path, buf, inode->i_sb, |
208 | xid, NULL); | 208 | xid, NULL); |
209 | 209 | ||
210 | if ((*oplock & 0xF) == OPLOCK_EXCLUSIVE) { | 210 | if ((oplock & 0xF) == OPLOCK_EXCLUSIVE) { |
211 | pCifsInode->clientCanCacheAll = true; | 211 | pCifsInode->clientCanCacheAll = true; |
212 | pCifsInode->clientCanCacheRead = true; | 212 | pCifsInode->clientCanCacheRead = true; |
213 | cFYI(1, "Exclusive Oplock granted on inode %p", inode); | 213 | cFYI(1, "Exclusive Oplock granted on inode %p", inode); |
214 | } else if ((*oplock & 0xF) == OPLOCK_READ) | 214 | } else if ((oplock & 0xF) == OPLOCK_READ) |
215 | pCifsInode->clientCanCacheRead = true; | 215 | pCifsInode->clientCanCacheRead = true; |
216 | 216 | ||
217 | return rc; | 217 | return rc; |
@@ -365,7 +365,7 @@ int cifs_open(struct inode *inode, struct file *file) | |||
365 | goto out; | 365 | goto out; |
366 | } | 366 | } |
367 | 367 | ||
368 | rc = cifs_open_inode_helper(inode, tcon, &oplock, buf, full_path, xid); | 368 | rc = cifs_open_inode_helper(inode, tcon, oplock, buf, full_path, xid); |
369 | if (rc != 0) | 369 | if (rc != 0) |
370 | goto out; | 370 | goto out; |
371 | 371 | ||