diff options
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r-- | fs/cifs/cifsfs.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 10c90294cd18..93ef09971d2f 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -511,7 +511,15 @@ static loff_t cifs_llseek(struct file *file, loff_t offset, int origin) | |||
511 | { | 511 | { |
512 | /* origin == SEEK_END => we must revalidate the cached file length */ | 512 | /* origin == SEEK_END => we must revalidate the cached file length */ |
513 | if (origin == SEEK_END) { | 513 | if (origin == SEEK_END) { |
514 | int retval = cifs_revalidate(file->f_path.dentry); | 514 | int retval; |
515 | |||
516 | /* some applications poll for the file length in this strange | ||
517 | way so we must seek to end on non-oplocked files by | ||
518 | setting the revalidate time to zero */ | ||
519 | if(file->f_path.dentry->d_inode) | ||
520 | CIFS_I(file->f_path.dentry->d_inode)->time = 0; | ||
521 | |||
522 | retval = cifs_revalidate(file->f_path.dentry); | ||
515 | if (retval < 0) | 523 | if (retval < 0) |
516 | return (loff_t)retval; | 524 | return (loff_t)retval; |
517 | } | 525 | } |