summaryrefslogtreecommitdiffstats
path: root/fs/cifs/file.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2006-05-30 20:05:10 +0200
committerSteve French <sfrench@us.ibm.com>2006-05-30 20:05:10 +0200
commitc01f36a896cb11e8533b4f7c132a1722fb15102b (patch)
tree95df1608cd828aa74e17e87221ec936a0223ab24 /fs/cifs/file.c
parent[CIFS] Do not limit the length of share names (was 100 for whole UNC name) (diff)
downloadlinux-c01f36a896cb11e8533b4f7c132a1722fb15102b.tar.xz
linux-c01f36a896cb11e8533b4f7c132a1722fb15102b.zip
[CIFS] ACPI suspend oops
Wasn't able to reproduce a hard hang, but was able to get an oops if suspended the machine during a copy to the cifs mount. This led to some things hanging, including a "sync". Also got I/O errors when trying to access the mount afterwards (even when didn't see the oops), and had to unmount and remount in order to access the filesystem. This patch fixed the oops. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r--fs/cifs/file.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 7ef30efe8f98..c881a1a29f0b 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -904,8 +904,10 @@ static ssize_t cifs_write(struct file *file, const char *write_data,
if (rc != 0)
break;
}
- if(experimEnabled || (pTcon->ses->server->secMode &
- (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) == 0) {
+ if(experimEnabled || (pTcon->ses->server &&
+ (pTcon->ses->server->secMode &
+ (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)
+ == 0))) {
struct kvec iov[2];
unsigned int len;