patch-2.4.27 linux-2.4.27/fs/hfs/file_hdr.c
Next file: linux-2.4.27/fs/hpfs/alloc.c
Previous file: linux-2.4.27/fs/hfs/file_cap.c
Back to the patch index
Back to the overall index
- Lines: 27
- Date:
2004-08-07 16:26:05.977401140 -0700
- Orig file:
linux-2.4.26/fs/hfs/file_hdr.c
- Orig date:
2001-08-12 10:56:56.000000000 -0700
diff -urN linux-2.4.26/fs/hfs/file_hdr.c linux-2.4.27/fs/hfs/file_hdr.c
@@ -384,7 +384,7 @@
struct hfs_cat_entry *entry = HFS_I(inode)->entry;
const struct hfs_hdr_layout *layout;
off_t start, length, offset;
- off_t pos = *ppos;
+ loff_t pos = *ppos;
int left, lcv, read = 0;
if (!S_ISREG(inode->i_mode)) {
@@ -399,7 +399,7 @@
}
/* Adjust count to fit within the bounds of the file */
- if ((pos >= inode->i_size) || (count <= 0)) {
+ if (pos != (unsigned)pos || pos >= inode->i_size || count <= 0) {
return 0;
} else if (count > inode->i_size - pos) {
count = inode->i_size - pos;
@@ -646,7 +646,7 @@
hfs_warn("hfs_hdr_write: mode = %07o\n", inode->i_mode);
return -EINVAL;
}
- if (count <= 0) {
+ if (count <= 0 || pos != (unsigned)pos) {
return 0;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)