From: pschwan Date: Fri, 8 Nov 2002 19:33:59 +0000 (+0000) Subject: update file size in ll_file_read, lest the VFS decide not to call us X-Git-Tag: 0.5.17~44 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=fbfb15d1d8d6b16b7426d205ce3e07eed2f75e08;p=fs%2Flustre-release.git update file size in ll_file_read, lest the VFS decide not to call us --- diff --git a/lustre/llite/file.c b/lustre/llite/file.c index 8008fb3..3f52d6b 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -454,6 +454,14 @@ static ssize_t ll_file_read(struct file *filp, char *buf, size_t count, } } + /* If we don't refresh the file size, generic_file_read may not even + * call us */ + retval = ll_file_size(inode, lsm); + if (retval < 0) { + CERROR("ll_file_size: %d\n", retval); + RETURN(retval); + } + CDEBUG(D_INFO, "Reading inode %ld, %d bytes, offset %Ld\n", inode->i_ino, count, *ppos); retval = generic_file_read(filp, buf, count, ppos);