patch-2.2.15 linux/fs/ext2/dir.c
Next file: linux/fs/fat/misc.c
Previous file: linux/fs/dquot.c
Back to the patch index
Back to the overall index
- Lines: 32
- Date:
Fri Apr 21 12:46:42 2000
- Orig file:
v2.2.14/fs/ext2/dir.c
- Orig date:
Sat Aug 14 02:25:58 1999
diff -u --new-file --recursive --exclude-from ../../exclude v2.2.14/fs/ext2/dir.c linux/fs/ext2/dir.c
@@ -183,8 +183,8 @@
bh, offset)) {
/* On error, skip the f_pos to the
next block. */
- filp->f_pos = (filp->f_pos & (sb->s_blocksize - 1))
- + sb->s_blocksize;
+ filp->f_pos = (filp->f_pos | (sb->s_blocksize - 1))
+ + 1;
brelse (bh);
return stored;
}
@@ -196,15 +196,18 @@
* version stamp to detect whether or
* not the directory has been modified
* during the copy operation.
+ * AV: It can't be modified, but it fscking
+ * can be seeked by another process that shares
+ * the descriptor.
*/
- unsigned long version = inode->i_version;
+ unsigned long version = filp->f_version;
error = filldir(dirent, de->name,
de->name_len,
filp->f_pos, le32_to_cpu(de->inode));
if (error)
break;
- if (version != inode->i_version)
+ if (version != filp->f_version)
goto revalidate;
stored ++;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)