aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/dir.c')
-rw-r--r--fs/cifs/dir.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index 0f5c62ba4038..6ed775986be9 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -130,7 +130,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
130 struct cifsFileInfo *pCifsFile = NULL; 130 struct cifsFileInfo *pCifsFile = NULL;
131 struct cifsInodeInfo *pCifsInode; 131 struct cifsInodeInfo *pCifsInode;
132 int disposition = FILE_OVERWRITE_IF; 132 int disposition = FILE_OVERWRITE_IF;
133 int write_only = FALSE; 133 bool write_only = false;
134 134
135 xid = GetXid(); 135 xid = GetXid();
136 136
@@ -152,7 +152,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
152 if (oflags & FMODE_WRITE) { 152 if (oflags & FMODE_WRITE) {
153 desiredAccess |= GENERIC_WRITE; 153 desiredAccess |= GENERIC_WRITE;
154 if (!(oflags & FMODE_READ)) 154 if (!(oflags & FMODE_READ))
155 write_only = TRUE; 155 write_only = true;
156 } 156 }
157 157
158 if ((oflags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL)) 158 if ((oflags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
@@ -254,7 +254,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
254 d_instantiate(direntry, newinode); 254 d_instantiate(direntry, newinode);
255 } 255 }
256 if ((nd == NULL /* nfsd case - nfs srv does not set nd */) || 256 if ((nd == NULL /* nfsd case - nfs srv does not set nd */) ||
257 ((nd->flags & LOOKUP_OPEN) == FALSE)) { 257 (!(nd->flags & LOOKUP_OPEN))) {
258 /* mknod case - do not leave file open */ 258 /* mknod case - do not leave file open */
259 CIFSSMBClose(xid, pTcon, fileHandle); 259 CIFSSMBClose(xid, pTcon, fileHandle);
260 } else if (newinode) { 260 } else if (newinode) {
@@ -266,8 +266,8 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
266 pCifsFile->netfid = fileHandle; 266 pCifsFile->netfid = fileHandle;
267 pCifsFile->pid = current->tgid; 267 pCifsFile->pid = current->tgid;
268 pCifsFile->pInode = newinode; 268 pCifsFile->pInode = newinode;
269 pCifsFile->invalidHandle = FALSE; 269 pCifsFile->invalidHandle = false;
270 pCifsFile->closePend = FALSE; 270 pCifsFile->closePend = false;
271 init_MUTEX(&pCifsFile->fh_sem); 271 init_MUTEX(&pCifsFile->fh_sem);
272 mutex_init(&pCifsFile->lock_mutex); 272 mutex_init(&pCifsFile->lock_mutex);
273 INIT_LIST_HEAD(&pCifsFile->llist); 273 INIT_LIST_HEAD(&pCifsFile->llist);
@@ -280,7 +280,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
280 pCifsInode = CIFS_I(newinode); 280 pCifsInode = CIFS_I(newinode);
281 if (pCifsInode) { 281 if (pCifsInode) {
282 /* if readable file instance put first in list*/ 282 /* if readable file instance put first in list*/
283 if (write_only == TRUE) { 283 if (write_only) {
284 list_add_tail(&pCifsFile->flist, 284 list_add_tail(&pCifsFile->flist,
285 &pCifsInode->openFileList); 285 &pCifsInode->openFileList);
286 } else { 286 } else {
@@ -288,12 +288,12 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
288 &pCifsInode->openFileList); 288 &pCifsInode->openFileList);
289 } 289 }
290 if ((oplock & 0xF) == OPLOCK_EXCLUSIVE) { 290 if ((oplock & 0xF) == OPLOCK_EXCLUSIVE) {
291 pCifsInode->clientCanCacheAll = TRUE; 291 pCifsInode->clientCanCacheAll = true;
292 pCifsInode->clientCanCacheRead = TRUE; 292 pCifsInode->clientCanCacheRead = true;
293 cFYI(1, ("Exclusive Oplock inode %p", 293 cFYI(1, ("Exclusive Oplock inode %p",
294 newinode)); 294 newinode));
295 } else if ((oplock & 0xF) == OPLOCK_READ) 295 } else if ((oplock & 0xF) == OPLOCK_READ)
296 pCifsInode->clientCanCacheRead = TRUE; 296 pCifsInode->clientCanCacheRead = true;
297 } 297 }
298 write_unlock(&GlobalSMBSeslock); 298 write_unlock(&GlobalSMBSeslock);
299 } 299 }