@@ -163,8 +164,12 @@
if (filp->f_flags & O_APPEND)
pos = inode->i_size;
- else
- pos = filp->f_pos;
+ else {
+ pos = *ppos;
+ if (pos != *ppos)
+ return -EINVAL;
+ }
+
/* Check for overflow.. */
if (pos > (__u32) (pos + count)) {
count = ~pos; /* == 0xFFFFFFFF - pos */
I don't see anything like this in any of the other filesystems in this
patch. Is this a mistake? If not, what's so magical about *ppos that
it's worth testing against its value a cycle ago?
pjm.