Commit b4a5b80b authored by Steve French's avatar Steve French

Flush writebehind before invalidate in file open path

parent 00f6a975
......@@ -21,11 +21,13 @@ Zwane Mwaikambo
Andi Kleen
Amrut Joshi
Shobhit Dayal
Sergey Vlasov
Test case and Bug Report contributors
-------------------------------------
Thanks to those in the community who have submitted detailed bug reports
and debug of problems they have found: Jochen Dolze, David Blaine,
Rene Scharfe, Martin Josefsson, Alexander Wild, Anthony Liguori,
Urban Widmark, Massimiliano Ferrero, Howard Owen and others.
Lars Muller, Urban Widmark, Massimiliano Ferrero, Howard Owen,
Kieron Briggs and others.
Version 1.11
------------
Better port 139 support to Windows servers (RFC1001/RFC1002 Session_Initialize) also
now allowing support for specifying client netbiosname.
Version 1.10
------------
Fix reconnection (and certain failed mounts) to properly wake up the
......
......@@ -187,6 +187,12 @@ cifs_open(struct inode *inode, struct file *file)
(file->f_dentry->d_inode->i_size == (loff_t)le64_to_cpu(buf->EndOfFile))) {
cFYI(1,("inode unchanged on server"));
} else {
if(file->f_dentry->d_inode->i_mapping) {
/* BB no need to lock inode until after invalidate*/
/* since namei code should already have it locked?*/
filemap_fdatawrite(file->f_dentry->d_inode->i_mapping);
filemap_fdatawait(file->f_dentry->d_inode->i_mapping);
}
cFYI(1,("invalidating remote inode since open detected it changed"));
invalidate_remote_inode(file->f_dentry->d_inode);
}
......@@ -1277,20 +1283,20 @@ unix_fill_in_inode(struct inode *tmp_inode,
(tmp_inode->i_blksize - 1 + pfindData->NumOfBytes) >> tmp_inode->i_blkbits;
if (S_ISREG(tmp_inode->i_mode)) {
cFYI(1, (" File inode "));
cFYI(1, ("File inode"));
tmp_inode->i_op = &cifs_file_inode_ops;
tmp_inode->i_fop = &cifs_file_ops;
tmp_inode->i_data.a_ops = &cifs_addr_ops;
} else if (S_ISDIR(tmp_inode->i_mode)) {
cFYI(1, (" Directory inode"));
cFYI(1, ("Directory inode"));
tmp_inode->i_op = &cifs_dir_inode_ops;
tmp_inode->i_fop = &cifs_dir_ops;
} else if (S_ISLNK(tmp_inode->i_mode)) {
cFYI(1, (" Symbolic Link inode "));
cFYI(1, ("Symbolic Link inode"));
tmp_inode->i_op = &cifs_symlink_inode_ops;
/* tmp_inode->i_fop = *//* do not need to set to anything */
} else {
cFYI(1, (" Init special inode "));
cFYI(1, ("Special inode"));
init_special_inode(tmp_inode, tmp_inode->i_mode,
tmp_inode->i_rdev);
}
......
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