patch-2.2.18 linux/fs/ext2/file.c
Next file: linux/fs/ext2/fsync.c
Previous file: linux/fs/ext2/balloc.c
Back to the patch index
Back to the overall index
- Lines: 37
- Date:
Tue Nov 28 16:33:31 2000
- Orig file:
v2.2.17/fs/ext2/file.c
- Orig date:
Fri Apr 21 12:46:42 2000
diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.17/fs/ext2/file.c linux/fs/ext2/file.c
@@ -120,14 +120,14 @@
case 1:
offset += file->f_pos;
}
- if (((unsigned long long) offset >> 32) != 0) {
#if BITS_PER_LONG < 64
+ if (offset >> 31)
return -EINVAL;
#else
- if (offset > ext2_max_sizes[EXT2_BLOCK_SIZE_BITS(inode->i_sb)])
- return -EINVAL;
+ if (offset < 0 ||
+ offset > ext2_max_sizes[EXT2_BLOCK_SIZE_BITS(inode->i_sb)])
+ return -EINVAL;
#endif
- }
if (offset != file->f_pos) {
file->f_pos = offset;
file->f_reada = 0;
@@ -136,7 +136,7 @@
return offset;
}
-static inline void remove_suid(struct inode *inode)
+inline void ext2_remove_suid(struct inode *inode)
{
unsigned int mode;
@@ -190,7 +190,7 @@
inode->i_mode);
return -EINVAL;
}
- remove_suid(inode);
+ ext2_remove_suid(inode);
if (filp->f_flags & O_APPEND)
pos = inode->i_size;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)