[CIFS] Fix oops in cifs_close due to unitialized lock sem and list in

new POSIX locking code

Signed-off-by: Steve French <sfrench@us.ibm.com>
This commit is contained in:
Steve French
2006-08-15 13:07:18 +00:00
parent 66abda5e1f
commit e466e4876b
3 changed files with 16 additions and 7 deletions

View File

@@ -267,6 +267,10 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
pCifsFile->invalidHandle = FALSE;
pCifsFile->closePend = FALSE;
init_MUTEX(&pCifsFile->fh_sem);
init_MUTEX(&pCifsFile->lock_sem);
INIT_LIST_HEAD(&pCifsFile->llist);
atomic_set(&pCifsFile->wrtPending,0);
/* set the following in open now
pCifsFile->pfile = file; */
write_lock(&GlobalSMBSeslock);