Commit 41b2f9da authored by Steve French's avatar Steve French

Fix oops in reconnection logic when no dentry for file being reconnected.

parent ffaf4d4a
Version 0.91
------------
Fix oops in reopen_files when invalid dentry.
Version 0.90
------------
Fix scheduling while atomic error in getting inode info on newly created file. Fix truncate of existing files
opened with O_CREAT set but O_TRUNC not set.
Fix scheduling while atomic error in getting inode info on newly created file.
Fix truncate of existing files opened with O_CREAT but not O_TRUNC set.
Version 0.89
------------
......
......@@ -3,7 +3,7 @@
*
* vfs operations that deal with files
*
* Copyright (c) International Business Machines Corp., 2002
* Copyright (C) International Business Machines Corp., 2002,2003
* Author(s): Steve French (sfrench@us.ibm.com)
*
* This library is free software; you can redistribute it and/or modify
......@@ -225,16 +225,21 @@ int reopen_files(struct cifsTconInfo * pTcon, struct nls_table * nlsinfo)
if(file) {
file->private_data = NULL;
read_unlock(&GlobalSMBSeslock);
rc = cifs_open(file->f_dentry->d_inode,file);
read_lock(&GlobalSMBSeslock);
if(rc) {
cFYI(1,("reconnecting file %s failed with %d",
file->f_dentry->d_name.name,rc));
if(file->f_dentry == 0) {
cFYI(1,("Null dentry for file %p",file));
read_lock(&GlobalSMBSeslock);
} else {
cFYI(1,("reconnection of %s succeeded",
file->f_dentry->d_name.name));
}
}
rc = cifs_open(file->f_dentry->d_inode,file);
read_lock(&GlobalSMBSeslock);
if(rc) {
cFYI(1,("reconnecting file %s failed with %d",
file->f_dentry->d_name.name,rc));
} else {
cFYI(1,("reconnection of %s succeeded",
file->f_dentry->d_name.name));
}
}
}
}
}
read_unlock(&GlobalSMBSeslock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment