|
@@ -511,7 +511,15 @@ static loff_t cifs_llseek(struct file *file, loff_t offset, int origin)
|
|
{
|
|
{
|
|
/* origin == SEEK_END => we must revalidate the cached file length */
|
|
/* origin == SEEK_END => we must revalidate the cached file length */
|
|
if (origin == SEEK_END) {
|
|
if (origin == SEEK_END) {
|
|
- int retval = cifs_revalidate(file->f_path.dentry);
|
|
|
|
|
|
+ int retval;
|
|
|
|
+
|
|
|
|
+ /* some applications poll for the file length in this strange
|
|
|
|
+ way so we must seek to end on non-oplocked files by
|
|
|
|
+ setting the revalidate time to zero */
|
|
|
|
+ if(file->f_path.dentry->d_inode)
|
|
|
|
+ CIFS_I(file->f_path.dentry->d_inode)->time = 0;
|
|
|
|
+
|
|
|
|
+ retval = cifs_revalidate(file->f_path.dentry);
|
|
if (retval < 0)
|
|
if (retval < 0)
|
|
return (loff_t)retval;
|
|
return (loff_t)retval;
|
|
}
|
|
}
|