lkml.org 
[lkml]   [1997]   [Oct]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Subject2.1.60 ext2: pls explain "pos = *ppos; if (pos != *ppos) ..."
From
Date
Among the diffs for fs/ext2/file.c is:

@@ -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.

\
 
 \ /
  Last update: 2005-03-22 13:40    [W:1.104 / U:0.688 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site