From 54d7803ddf2978fbdbef64ead0981777e51905ba Mon Sep 17 00:00:00 2001 From: Steve French Date: Tue, 11 Sep 2007 05:50:53 +0000 Subject: [PATCH] --- yaml --- r: 71548 b: refs/heads/master c: 4efa53f0907bb4378015c129a2c11b8d3a90bce2 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/cifs/file.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index d56d8c32bf00..1f05959a3424 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 15745320f374aa6cbfe4836b76469159c0f49640 +refs/heads/master: 4efa53f0907bb4378015c129a2c11b8d3a90bce2 diff --git a/trunk/fs/cifs/file.c b/trunk/fs/cifs/file.c index b1807fd1ac40..792549193865 100644 --- a/trunk/fs/cifs/file.c +++ b/trunk/fs/cifs/file.c @@ -545,6 +545,7 @@ int cifs_close(struct inode *inode, struct file *file) } else rc = -EBADF; + read_lock(&GlobalSMBSeslock); if (list_empty(&(CIFS_I(inode)->openFileList))) { cFYI(1, ("closing last open instance for inode %p", inode)); /* if the file is not open we do not know if we can cache info @@ -552,6 +553,7 @@ int cifs_close(struct inode *inode, struct file *file) CIFS_I(inode)->clientCanCacheRead = FALSE; CIFS_I(inode)->clientCanCacheAll = FALSE; } + read_unlock(&GlobalSMBSeslock); if ((rc == 0) && CIFS_I(inode)->write_behind_rc) rc = CIFS_I(inode)->write_behind_rc; FreeXid(xid);