if FORGET was received earlier than the last RELEASE (bug found
with the LTP test-suite)
+ * Fix file corruption in case of bigread option. (bug found with
+ LTP)
+
* Minor fix in read: print debug info even if read size is zero
2004-07-04 Miklos Szeredi <mszeredi@inf.bme.hu>
struct inode *inode = mapping->host;
struct fuse_conn *fc = INO_FC(inode);
- if(fc->flags & FUSE_LARGE_READ)
+ if(fc->flags & FUSE_LARGE_READ) {
+ /* Don't allow this to get mixed up with writes */
+ down(&inode->i_sem);
fuse_file_bigread(mapping, inode, *ppos, count);
+ up(&inode->i_sem);
+ }
return generic_file_read(filp, buf, count, ppos);
}